question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

_app.js build bundle size too big

See original GitHub issue

Bug report

The _app.js build bundle size is too big

Describe the bug

I have looked through many issues for solutions and it seems that the team has repeatedly mentioned that next.js build bundle size is small. What I realised was that the _app.js was already 216 kb (with yellow indication, not green) when I have not added any additional code or library.

Adding a little more code or importing some libraries in a custom _app.js file will increase the bundle size until the indicator becomes red, meaning it is a unacceptable size?

To Reproduce

Just do npx create-next-app and yarn build

Expected behavior

Currently, _app.js bundle size is already 216 kb. Expected should be a much smaller value. I don’t know what should be the acceptable size, but of course, the smaller the better. Otherwise, it seems like next.js is really too bloated.

Screenshots

nextjs-build-ss

System information

  • OS: Windows
  • Version of Next.js: 9.1.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

16reactions
luanluchocommented, May 27, 2020

Hey guys I’d created a new project following your with redux thunk example and my _app.js file size became larger than 500kb.

Screen Shot 2020-05-27 at 3 16 40 pm

Please shed some light.

1reaction
srdjancommented, Dec 14, 2019

just a suggestion… consider removing (or showing in different color) number for the total size of shared:

unnamed

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Methods to Reduce JavaScript Bundle Size
If your application bundle size increases and affects performance, you can compress them to reduce the size. Gzip and Brotli are the most ......
Read more >
Small Bundles, Fast Pages: What To Do With Too Much ...
This post will explain why bundle size matters and recommend tools and processes you can follow to monitor, visualise, and most importantly, ...
Read more >
How to Reduce Your Webpack Bundle Size for Web App ...
So I'm gonna try to give you some tips used by teams working on large apps to reduce the size of their main...
Read more >
Slimming down your bundle size
But a critical part for improving the frontend performance is to reduce the JavaScript bundle size that should be downloaded via the network....
Read more >
3 ways to reduce webpack bundle size - Jakob Lind
You build your webpack app and see this WARNING in the console: You want to follow the recommendation and keep your bundle size...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found