-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
build: improve tree shaking #3803
Conversation
treeshake: { | ||
propertyReadSideEffects: false, | ||
unknownGlobalSideEffects: false, | ||
tryCatchDeoptimization: false, | ||
}, |
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.
I'm worried about those, as it would be a massive pain to debug any issue they could accidentally cause. The gain seems fairly low, so I'd tend to favour long-term maintainability.
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's fair, reverted 👍
5c40c94
to
c5d2f9d
Compare
Tests show something broke |
Seems to be rollup/rollup#4195, fixed by updating |
What's the problem this PR addresses?
Rollup is preserving code that could possibly have side effects but we know doesn't.es5
code.How did you fix it?
Enable more aggressive tree shaking.es2015
code.Result
Tested on this repo
$ du -sb ./.pnp-* 2665838 ./.pnp-after.cjs 2670400 ./.pnp-before.cjs
Checklist