mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09: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 ProgmemGenerator = require('./progmem-generator.js');
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
|
|
||||||
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||||
|
|
||||||
module.exports = function override(config, env) {
|
module.exports = function override(config, env) {
|
||||||
const hosted = process.env.REACT_APP_HOSTED;
|
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);
|
const terserPlugin = config.optimization.minimizer.find((plugin) => plugin instanceof TerserPlugin);
|
||||||
terserPlugin.options.extractComments = false;
|
terserPlugin.options.extractComments = false;
|
||||||
|
|
||||||
|
// create size map
|
||||||
|
// config.plugins.push(new BundleAnalyzerPlugin());
|
||||||
|
|
||||||
// build progmem data files
|
// build progmem data files
|
||||||
config.plugins.push(new ProgmemGenerator({ outputPath: '../lib/framework/WWWData.h', bytesPerLine: 20 }));
|
config.plugins.push(new ProgmemGenerator({ outputPath: '../lib/framework/WWWData.h', bytesPerLine: 20 }));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user