不用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"), ]}
1 回答
慕码人2483693
TA贡献1860条经验 获得超9个赞
{
test: /\.css/,
use:ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader'
},
{
loader: 'postcss-loader'
}
]
})
}
添加回答
举报
0/150
提交
取消