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
I have a library file that is used by both the client and the server that contains utilities for working with routes
One utility used only by the client uses react-router-dom
What is the current behavior?
When compiling the server build webpack is correctly eliminating the dead code that uses react-router-dom but it is not removing the react-router-dom import
If the current behavior is a bug, please provide the steps to reproduce.
I believe that this is a bug because the react-router-dom library is tagged with sideEffects: false in its package.json
Bug report
I have a library file that is used by both the client and the server that contains utilities for working with routes
One utility used only by the client uses react-router-dom
What is the current behavior?
When compiling the server build webpack is correctly eliminating the dead code that uses react-router-dom but it is not removing the react-router-dom import
If the current behavior is a bug, please provide the steps to reproduce.
I believe that this is a bug because the react-router-dom library is tagged with
sideEffects: false
in its package.jsonI have created a minimal reproduction here: https://github.com/MJez29/webpack-harmony-side-effect-evaluation
In the logs I see
What is the expected behavior?
I expect
react-router-dom
to be completely removed from the build output because it is not used and it is labeled as not having any side effectsOther relevant information:
webpack version: 5.92.1
Node.js version: v20.12.2
Operating System:
Additional tools:
The text was updated successfully, but these errors were encountered: