project is configured through dva and roadhog. There are no webpack.config.js files, but .webpackrc.js, roadhogrc.mock.js files. Because IE9 has a limit on the size of the packaged CSS file, I want to split the packaged css file by configuring the css-split-webpack-plugin plug-in. According to http://npm.taobao.org/package., I modified the configuration of the .webpackrc.js file. However, when you come out and execute run build after configuration, you will get an error: Build failed: Configuration item plugins is not valid, please remove it.
.should I configure webpackrc.js or roadhogrc.mock.js? Thank you ~
* p
of the webpackrc.js filevar ExtractTextPlugin = require("extract-text-webpack-plugin");
var CSSSplitWebpackPlugin = require("css-split-webpack-plugin").default;
export default {
//
...,
module: {
loaders: [{
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader"),
}],
},
plugins: [
new ExtractTextPlugin("styles.css"),
new CSSSplitWebpackPlugin({size: 4000}),
],
}