Skip to content

fix: set sideEffect:false in package.json #33153

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Apr 16, 2025

Was reading recently about how modern tree-shaking 💨🌳🍂 works in modern web apps, and the sideEffect property in package.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 in webpack.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

Was reading recently about how modern tree-shaking 💨🌳🍂 works in modern web apps, and the `sideEffect` property in `package.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 in `webpack.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.
Copy link

korbit-ai bot commented Apr 16, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

Copy link
Contributor

@mistercrunch Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

Copy link
Contributor

@mistercrunch Ephemeral environment spinning up at http://34.210.40.13:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants