mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
add BundleAnalyzerPlugin (optional)
This commit is contained in:
@@ -3,6 +3,8 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const ProgmemGenerator = require('./progmem-generator.js');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
|
||||
module.exports = function override(config, env) {
|
||||
const hosted = process.env.REACT_APP_HOSTED;
|
||||
|
||||
@@ -23,8 +25,14 @@ module.exports = function override(config, env) {
|
||||
const terserPlugin = config.optimization.minimizer.find((plugin) => plugin instanceof TerserPlugin);
|
||||
terserPlugin.options.extractComments = false;
|
||||
|
||||
// create size map
|
||||
// config.plugins.push(new BundleAnalyzerPlugin());
|
||||
|
||||
// build progmem data files
|
||||
config.plugins.push(new ProgmemGenerator({ outputPath: '../lib/framework/WWWData.h', bytesPerLine: 20 }));
|
||||
|
||||
|
||||
|
||||
}
|
||||
return config;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user