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.

[Q] Bundle size is not decreasing in angular prod build

See original GitHub issue

Hi,

we are using exceljs in our project but we noticed that the package size is huge. In dev it is not a real problem but for the production builds, the size is not decreasing. We are like the ease of use of the package, so we don’t actually want to change to another implementation. But if we aren’t able to get it smaller, it will be necessary.

Have any of you guys have an idea why the package size isn’t decreasing for our prod build, or if we need to do something in order to achieve i?

These are the commands used to analyze the bundle

npm run build -- --stats-json && npm run analyze-bundle
npm run build:prod -- --stats-json && npm run analyze-bundle

Below are 2 images comparing the node modules size and content of the dev and prod bundle, as you can see the size of exceljs stays 1.08mb in both bundles.

dev: devbundle

prod: prodbundle

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

3reactions
KingDarBojacommented, May 27, 2021

Same issue here, guess the library is not optimized for tree-shaking?

0reactions
dmytro-afonincommented, Sep 16, 2022

Same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to decrease prod bundle size? - angular - Stack Overflow
Initial prod build took 10sec, subsequent finished in 3sec. Bundle size is 244kB before Gzip. The command I used to build was "ng...
Read more >
Optimize Angular bundle size in 4 steps | by Siyang Kern Zhao
Step 1: Know your Bundle Size ... It's hard to deny that initial page loading time is tightly connected with your Angular app...
Read more >
Angular - How to improve bundle size? - Daniel Kreider
Is your Angular application slow? Here are 5 ways you can reduce the bundle size. And make it load faster. · 1. Investigate...
Read more >
Angular 13 in Depth - Sébastien Dubois
IE11 is no longer supported; Faster production builds (+68%) ... drops the old IE polyfills and reduces bundle size during migration.
Read more >
Reduce the Bundle Size of Your Angular App | Pluralsight
If the package is using ES6 imports, you can take advantage of tree-shaking in your Angular build by changing your imports from module...
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