You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when using esbuild-wasm you have two options:
either you enable worker: true in the setup options, which means your environment requires support for web workers,
or you don't enable workers, in which case the esbuild code will call new Function(...) with the code originally destined for the web worker
The latter case does not work on platforms like Deno Deploy or Cloudflare Workers, which limit dynamic JS evaluation for security/introspectability.
It would be great if the second option (not using a worker), did not require the use of dynamic code evaluation. Could the source code always be a "real" function in source, and then .toString()'d for the worker?
The text was updated successfully, but these errors were encountered:
Currently when using
esbuild-wasm
you have two options:worker: true
in the setup options, which means your environment requires support for web workers,new Function(...)
with the code originally destined for the web workerThe latter case does not work on platforms like Deno Deploy or Cloudflare Workers, which limit dynamic JS evaluation for security/introspectability.
It would be great if the second option (not using a worker), did not require the use of dynamic code evaluation. Could the source code always be a "real" function in source, and then
.toString()
'd for the worker?The text was updated successfully, but these errors were encountered: