-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore(starters): add sideEffects: false to the lib template 😎 #7855
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
Conversation
🦋 Changeset detectedLatest commit: 71ea2dd The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
Yes great, but the README should include a paraghraph saying that the side-effects are set to false, and that if there are side effects (like a global being set), then it should be removed, possibly only for the file that has it. That field isn't a part of the npm spec, but it is used by bundlers, and the best documentation is at https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free |
|
commit: |
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That e2e test is flaky, let me run it again
wmertens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Close #7854
Otherwise there might be some side effects imports when building a consumer project, which will be added as static imports to the bundle graph, leading to slight over-prefetching of unnecessary bundles for user events.