不用ExtractTextPlugin都不报错,用这个插件配置不来啊
const path = require('path')
const ExtractTextPlugin = require("extract-text-webpack-plugin")
module.exports = {
entry:'./index.js',
output:{
filename:'build.js',
path:path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.styl$/,
use:ExtractTextPlugin.extract({use:[
'style-loader',
{ loader: 'css-loader', options: { importLoaders: 2 } },
'postcss-loader',
'stylus-loader'
]})
}
]
},
plugins: [
new ExtractTextPlugin("styles.css"),
]
}
慕码人2483693
相关分类