Uh oh!
There was an error while loading. Please reload this page.
fix(nextjs): Restore tree shaking capabilities - #7710
Conversation
size-limit report 📦
|
AbhiPrasad
left a comment
There was a problem hiding this comment.
Can we test this to make sure we don't regress?
Also did you validate with a local app? Can you show before/after in the PR?
lforst
commented
Apr 3, 2023
We already have tests in place for this! E2E tests would fail if this would eliminate side effects somehow.
Well, I just tried it out locally, and turns out replay does properly tree shake away in my Next.js 13 test application, regardless of this change. Maybe it is related to older webpack versions. I am still going to go forward with this because it is more correct this way. |
rchl
commented
Apr 3, 2023
I've crated somewhat relevant #7713 |
We messed up in #6592 and destroyed tree shaking capabilities for webpack by entirely removing the
sideEffectsfield in the package.json. This PR adds it back so tree shaking should be possible again.Hopefully fixes#7680