trxcllnt commented on a change in pull request #8418:
URL: https://github.com/apache/arrow/pull/8418#discussion_r608688491
##########
File path: js/src/util/utf8.ts
##########
@@ -22,7 +22,7 @@ import {
} from 'text-encoding-utf-8';
/** @ignore @suppress {missingRequire} */
-const _Buffer = typeof Buffer === 'function' ? Buffer : null;
+const _Buffer = eval("typeof Buffer === 'function' ? Buffer : null");
Review comment:
Oh I forgot about CSPs. I'll revert this for now, and change the webpack
configs to specify `{ node: { buffer: false } }`.
Haven't gotten any complaints about using the Function constructor, but
https://github.com/webpack/webpack/issues/5627 seems to have a few workarounds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]