-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
Bug report
What is the current behavior?
When bundling async wasm targeting node with specific version and commonjs, the generated code will use import.meta. Which is not valid under commonjs.
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/ashi009/wasm-webpack
npm i
npm run build
grep 'import.meta' dist/bundle.js
What is the expected behavior?
no import.meta in the generated bundle.
this is a regression from
0016a1a#diff-191522664ed219f319b8f2a6ed831bc2888af7294dec2e57a0bd640c7b2e298d. Before this change the async-node and async-node-module are processed in different branches. Where output.environment.module is actually handled under the assumption that the module output is required.
Other relevant information:
webpack version: 5.97.1
Node.js version: 18.17
Operating System: macOS
Additional tools: