How to use the @dojo/webpack-contrib/webpack-bundle-analyzer/BundleAnalyzerPlugin function in @dojo/webpack-contrib

To help you get started, we’ve selected a few @dojo/webpack-contrib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dojo / cli-build-app / src / dist.config.ts View on Github external
: { cachePrefix: packageName, ...args.pwa.serviceWorker };
	}

	config.mode = 'production';

	config.optimization = {
		...config.optimization,
		namedChunks: true,
		minimizer: [new TerserPlugin({ sourceMap: true, cache: true })],
		flagIncludedChunks: false
	};

	config.plugins = [
		...plugins!,
		assetsDirExists && new CopyWebpackPlugin([{ from: assetsDir, to: path.join(outputPath, 'assets') }]),
		new BundleAnalyzerPlugin({
			analyzerMode: 'static',
			openAnalyzer: false,
			generateStatsFile: true,
			reportFilename: '../info/report.html',
			statsFilename: '../info/stats.json'
		}),
		new HtmlWebpackPlugin({
			base,
			inject: true,
			chunks: [entryName],
			meta: manifest ? { 'mobile-web-app-capable': 'yes' } : {},
			template: 'src/index.html',
			cache: false
		}),
		args.externals &&
			args.externals.dependencies &&