I have following webpack configuration:
Rules:
{
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会编译两次?