Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
: { 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 &&