-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
I find it conflicts with speed-measure-webpack-plugin:
When I remove speed-measure-webpack-plugin,no this error.
The project repository: coo;
webpack.dev.ts:
import { resolve } from 'path';
import merge from 'webpack-merge';
import { HotModuleReplacementPlugin, NamedModulesPlugin, DllReferencePlugin } from 'webpack';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import AddAssetHtmlPlugin from 'add-asset-html-webpack-plugin';
import { PROJECT_ROOT } from '../constants';
import commonConfig from './webpack.common';
const devConfig = merge(commonConfig, {
mode: 'development',
devtool: 'eval-source-map',
plugins: [
new HotModuleReplacementPlugin(),
new NamedModulesPlugin(),
new ForkTsCheckerWebpackPlugin({
memoryLimit: 1024,
tsconfig: resolve(__dirname, '../../src/renderer/tsconfig.json'),
}),
new DllReferencePlugin({
context: PROJECT_ROOT,
manifest: resolve(PROJECT_ROOT, 'public/vendor/vendors-manifest.json'),
}),
new AddAssetHtmlPlugin({ filepath: resolve(PROJECT_ROOT, 'public/vendor/*.dll.js') }),
],
});
export default devConfig;webpack.index.ts:
import { argv } from 'yargs';
import merge from 'webpack-merge';
import SpeedMeasurePlugin from 'speed-measure-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import SizePlugin from 'size-plugin';
import { __DEV__ } from '../constants';
import devConfig from './webpack.dev';
import prodConfig from './webpack.prod';
// eslint-disable-next-line import/no-mutable-exports
let webpackConfiguration = __DEV__ ? devConfig : prodConfig;
if (argv.analyze) {
webpackConfiguration = merge(webpackConfiguration, {
plugins: [new SizePlugin({ writeFile: false }), new BundleAnalyzerPlugin()],
});
const smp = new SpeedMeasurePlugin();
webpackConfiguration = smp.wrap(webpackConfiguration);
}
export default webpackConfiguration;tjx666, shiziChing, kingyj and adouni1996
Metadata
Metadata
Assignees
Labels
No labels
