Webpack: add SpeedMeasurePlugin

build-json
Alex Gleason 2021-09-04 15:19:50 -05:00
rodzic 73baa1f55c
commit 9700deeba5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
4 zmienionych plików z 18 dodań i 5 usunięć

Wyświetl plik

@ -132,6 +132,7 @@
"sass": "^1.20.3",
"sass-loader": "^10.0.0",
"semver": "^7.3.2",
"speed-measure-webpack-plugin": "^1.5.0",
"stringz": "^2.0.0",
"substring-trie": "^1.0.2",
"terser-webpack-plugin": "^4.2.3",

Wyświetl plik

@ -2,8 +2,11 @@
console.log('Running in development mode'); // eslint-disable-line no-console
const { merge } = require('webpack-merge');
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
const sharedConfig = require('./shared');
const smp = new SpeedMeasurePlugin();
const watchOptions = {};
const backendUrl = process.env.BACKEND_URL || 'http://localhost:4000';
@ -48,7 +51,7 @@ if (process.env.VAGRANT) {
watchOptions.poll = 1000;
}
module.exports = merge(sharedConfig, {
module.exports = smp.wrap(merge(sharedConfig, {
mode: 'development',
cache: true,
devtool: 'source-map',
@ -94,4 +97,4 @@ module.exports = merge(sharedConfig, {
serveIndex: true,
proxy: makeProxyConfig(),
},
});
}));

Wyświetl plik

@ -6,10 +6,12 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const OfflinePlugin = require('offline-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
const sharedConfig = require('./shared');
module.exports = merge(sharedConfig, {
const smp = new SpeedMeasurePlugin();
module.exports = smp.wrap(merge(sharedConfig, {
mode: 'production',
devtool: 'source-map',
stats: 'normal',
@ -97,4 +99,4 @@ module.exports = merge(sharedConfig, {
// },
}),
],
});
}));

Wyświetl plik

@ -11536,6 +11536,13 @@ specificity@^0.4.1:
resolved "https://registry.yarnpkg.com/specificity/-/specificity-0.4.1.tgz#aab5e645012db08ba182e151165738d00887b019"
integrity sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==
speed-measure-webpack-plugin@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.5.0.tgz#caf2c5bee24ab66c1c7c30e8daa7910497f7681a"
integrity sha512-Re0wX5CtM6gW7bZA64ONOfEPEhwbiSF/vz6e2GvadjuaPrQcHTQdRGsD8+BE7iUOysXH8tIenkPCQBEcspXsNg==
dependencies:
chalk "^4.1.0"
split-string@^3.0.1, split-string@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"