Hello,
how to use https://github.com/webpack-contrib/webpack-bundle-analyzer in frontity ?
HI @mehul
Frontity genereate some reports automatically by using Webpack Bundle Analyzer so you donβt have to worry about it
When you do npx frontity dev
or npx frontity build
you get a build
folder in the root of your project
βββ build
β βββ analyze
β β βββ module-development.html
β β βββ server-development.html
β βββ bundling
β β βββ chunks.module.json
β β βββ entry-points
β β βββ my-frontity-project
β β β βββ client.ts
β β βββ server.ts
β βββ server.js
β βββ static
β βββ my-frontity-project.module.js
β βββ list.module.js
Inside that build
folder there is a .html
file generated at analyze/module-development.html
This file is a visual report in the form of a tree generated by Webpack Bundle Analyzer.
This report shows you the modules included on each bundle and the size of each one, so you can analyze them and maybe decide using other modules (or not including a specific module at all) to reduce the size of the final bundle
Hope this helps
Iβm not getting the output folder βanalyzeβ when I try this. Iβm probably making a super simple mistake. Can you explain how to get the analyze folder to generate from a fresh Frontity build?
Looks like analyze is false by default, just need to run
npx frontity build --analyze