Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: DefinePlugin in webpack will throw a warning for the same key, and rspack will choose to override it. #6821

Open
nanianlisao opened this issue Jun 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nanianlisao
Copy link

System Info

System:
OS: macOS 13.2
CPU: (8) arm64 Apple M1
Memory: 92.13 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.17.0
npm: 9.6.7
pnpm: 8.9.0
bun: 1.0.0
Browsers:
Chrome: 126.0.6478.61
Safari: 16.3

Details

https://github.com/webpack/webpack/blob/34e2561addb0f65a7a6fb0ce7ae1aea4cd1d599f/lib/DefinePlugin.js#L659-L674

Reproduce link

No response

Reproduce Steps

empty

@nanianlisao nanianlisao added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jun 17, 2024
@LingyuCoder LingyuCoder removed the pending triage The issue/PR is currently untouched. label Jun 17, 2024
@h-a-n-a
Copy link
Collaborator

h-a-n-a commented Jun 17, 2024

This is a known issue, as we haven't fully aligned with webpack. Will be fixed, just stay tuned ;-)

@nanianlisao
Copy link
Author

@h-a-n-a
Thanks for the reply. I hope this priority can be raised slightly, because this is a relatively hidden but serious bug, especially in rspack and webpack, process.env.NODE_ENV will be injected after optimization.nodeEnv is turned on.

In addition, if it is convenient, can you provide us with which issue is it duplicated? I will close this issue and subscribe to related content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants