-
Notifications
You must be signed in to change notification settings - Fork 26.2k
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
2x size of the initial bundle load #1637
Comments
@mohitgupta1918 this PR should address this - #1611. Essentially, next 2.0 inlines the current route bundle and component bundle into the |
Anyway, @mohitgupta1918 18MB is so wrong. I assume you are sending a lot of data via getInitialProps. |
Wow. That component is 9MB :) Anyway, #1611 should fix double loading issue. |
I am using next.js with express server.
I have created a single page(pages/index.js) that has a extremely long text( 9 Mb size ).
when i am running the application
{
"scripts": {
"dev": "node server.js",
"build": "next build",
"start": "NODE_ENV=production node server.js"
}
after running npm run build, npm run start
The browser is loading a 18.5 Mb bundle.
image
after running the webpack-bundle-analyser I have identified
{
"name": "dist/pages/index.js",
"size": 9771946,
"chunks": [],
"chunkNames": [],
"emitted": true,
"isOverSizeLimit": true
},
{
"name": "bundles/pages/index.json",
"size": 9771839,
"chunks": [],
"chunkNames": [],
"emitted": true,
"isOverSizeLimit": true
},
Repo link :
Can someone explain ?
The text was updated successfully, but these errors were encountered: