Skip to content

2x size of the initial bundle load #1637

@mohitgupta1918

Description

@mohitgupta1918

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions