我有以下 webpack 配置:
规则:
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: false
}
}, {
loader: 'sass-loader',
options: {
sourceMap: false,
processCssUrls: false
}
}
]
}
插件:
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id].css'
})
在构建和观察输出时,SpeedMeasurePlugin
我得到这样的输出:
mini-css-extract-plugin, and
css-loader, and
sass-loader took 12.73 secs
module count = 1
css-loader, and
sass-loader took 12.66 secs
module count = 1
为什么 sass 会编译两次?