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

Monorepo -> Tree Shaking Refactor: Turn sideEffect setting in package.json #3457

Closed
holgerd77 opened this issue Jun 17, 2024 · 2 comments
Closed

Comments

@holgerd77
Copy link
Member

Part of #3446

Earliest start together with official breaking release work!

Small issue to not get over it since it seems important, citing from @tmm from here #3446 (comment) :

In addition to what @roninjin10 described, "sideEffects": false should be added to package.json files for maximum tree-shakability.

Without "sideEffects" switched off build systems aren't able to properly eliminate dead code (e.g. Next.js) and could still contain unused code even if they are unused.

More info: https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free

As an additional note, this might actually need some analysis if we do have side effects in our packages, so this would be using things in a global context and the like.

If we do it is likely a good idea to refactor along that these go away!

@holgerd77
Copy link
Member Author

Closed by #3497

@roninjin10
Copy link
Collaborator

Let’s go! I’ll share how big of a difference this made in Tevm based apps when this goes live

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

No branches or pull requests

2 participants