Documentation
Building your App
Analyzing Bundles Size

Analyzing the bundle(s) size

All templates come with a bundle analyzer, to start analyzing the build output follow the steps for your specific template.

Vite

Uncomment the following lines in vite.config.js.

vite.config.js
/// ...
		return defineConfig({
            /// ...
            plugins: [
                /// ...
 
				// visualizer({
				// 	open: true,
				// }),
            ],
/// ...

Now when you run build

npm run build

Your browser will automatically open the analyzer stats like below:


vite - rollup bundle analyze

Webpack

Uncomment the following line in webpack.prod.mjs.

webpack/webpack.prod.mjs
/// ...
const Config = {
	/// ...
 
	plugins: [
        /// ...
 
		// new BundleAnalyzerPlugin(),
	],
/// ...

Now when you run build

npm run build

Your browser will automatically open the analyzer stats like below:


webpack bundle analyze