fix: set sideEffect:false in package.json #33153
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Was reading recently about how modern tree-shaking 💨🌳🍂 works in modern web apps, and the
sideEffect
property inpackage.json
was mentionned so I checked to see our settings.Apparently we don't have it set right - unless I'm missing something - so I decided to open a DRAFT PR to test things and have the conversation.
Apparently the
sideEffect
we have inwebpack.config.js
is probably an artifact/legacy from a previous era. Nowadays npm packages should define weather/which sideEffect they contain as a hint for the bundler to tree-shake the right things.Anyhow, let's see if this builds and passes CI.
Doing some git archeology, it looks like this was added back in 2020 ->
9bdfa055ac0#diff-3834c36280e1af5685801f3357578aaec5a110699a2b8eb97844c56b4400c091R197