Typolino – Analyze Bundle Size

Finally I had some time to fix some bugs on the weekend – and I switched all queries to get() as I don’t see the point for this application to get live updates – one may ask why use Firebase at all. But I have to say it’s more than just the realtime features.

How to

To find out more about the bundle size of your application you could use a bundle analzyer. The tool is really easy to install and use.

npm install --save-dev webpack-bundle-analyzer 

Build the application and generating the stats file, which is required to analyze the bundles.

ng build --stats-json 

And finally run the tool

npx webpack-bundle-analyzer .\dist\typolino\stats-es2015.json

If you want to see the effects of tree shaking you can analyze the prod bundles as well (same as above, but just run ng build –prod –stats-json).

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.