Webpack: add SpeedMeasurePlugin
This commit is contained in:
@ -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(),
|
||||
},
|
||||
});
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user