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
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
System Info
System Info
System:
OS: macOS 13.4.1
CPU: (8) x64 Apple M1
Memory: 33.23 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.20.0 - ~/git/nvs/default/bin/node
Yarn: 1.22.19 - ~/.npm-global/bin/yarn
npm: 8.10.0 - ~/.npm-global/bin/npm
pnpm: 7.26.3 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 115.0.5790.170
Chrome Canary: 118.0.5939.0
Safari: 16.5.1
npmPackages:
@rspack/cli: latest => 0.2.11
@rspack/plugin-minify: ^0.1.12 => 0.1.12
@rspack/plugin-node-polyfill: latest => 0.1.12
Details
Build error when building with library and optimization config at the same time. Uncaught ReferenceError: require is not defined
But when I remove the optimization configuration, every thing is ok.
When configuring the optimization, M and P are assigned the value of an object, so the subsequent require logic is executed.
When i remove the optimization config, module and exports is undefined, so the bottom logic is executed
Reproduce link
https://github.com/TopGrd/rspack-umd-bug
Reproduce Steps
npm i
npm run build
serve ./dist
The text was updated successfully, but these errors were encountered: