Issue
I have an agular 14 project with plotly.js-dist-min 2.27.1 defined in package.json. The minified version should have 3.6 MB, but when I run webpack-bundle-analyzer with prod build, it shows plotly.js-dist-min to be 6 MB.
This is consistent also with the size of the whole prod build being 16 MB.
I was previously using plotly 1.58.4 directly included as js asset and I did not have that issue. (the scripts 3.32 MB is just plotly).
Solution
Plotly comes with different bundles, as mentioned in the readme
Maybe you can switch to one of these lighter bundles to reduce the size.
Also kindly check if you have enabled buildOptimizer
and optimization
to true in angular.json
for production build, maybe its turned off?
Answered By - Naren Murali
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.