-
Notifications
You must be signed in to change notification settings - Fork 28k
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
Reduce the client bundle size of App Router #51806
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
b7eb6ef
to
b346280
Compare
26b84b2
to
68776f0
Compare
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.
Thanks! BTW did you measure the diff after this PR?
Yeah. But it seems that I can only remove some of the bytes. I am only able to drop a few module imports, which eliminates some On the other hand, I do notice that there are some tree-shaking problems. E.g. the whole |
After migrating a Next.js app from Pages Router to App Router and using as many RSC as possible, I notice that the client js bundle size actually increases by 5%. It turns out that Next.js has introduced a lot of code to the client bundle.
The PR is an attempt to reduce the client bundle size.