A way to reduce the bundle size
See original GitHub issueI noticed that the my bundle size was too big and now I know that is vue-apexcharts
is 455kb.
There is some way to reduce that?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Possible ways to reduce your webpack bundle size - Medium
Here are some cool ways you can reduce your webpack bundle size: ... Scope hoisting uses a smarter way to add the modules...
Read more >How to Slim Down Your Bundle Size
Consider rewriting libraries that are large in size where you might not need all of its functionalities. · Check to see if you...
Read more >Minimizing Webpack bundle size - Anvil
Learn how to minimize your Webpack bundle size by following these best practices, ensuring an optimal user experience.
Read more >Reducing JavaScript Bundle Size. Part One
Code splitting is the ability to take a collection of modules, tied together in some pattern, and remove them from the main JavaScript...
Read more >Small Bundles, Fast Pages: What To Do With Too Much ...
How does bundle size affect performance? · During page load: big bundles take longer to download. · During parse and compile: big bundles...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The bundle is very heavy at the moment, and would be a real blocker to a lot of people using this in production, which is a shame.
I’d agree with @unsalted, the ideal scenario is to allow the user’s to import the features they want, as opposed to making some best guessed groups
lite
,basic
, etc.Proper modularisation and exports as mentioned previously, i.e. albeit I’m in a vue scenario.
Then you’re deferring the tree-shaking to the user’s webpack/rollup, they’d compile and tree-shake lib, not reference the precompiled
/dist
dir.Would be a start, even if you did end up with a large
common
file with all the zoom/pan/export logic.lodash and d3 are both good examples of how a lib has been properly modularised.
I’d take a look at d3, which has achieved exactly this, it still has a cdn hosted
plug-n-play
, all the while complete split up into microlibraries, so from a dev side, if I need scales, I can import d3-scale.I appreciate this is a large refactor, but with apexcharts topping out at almost 500kb, that’s a real blocker to adoption, which seems a real shame considering all the great work going into this excellent lib.