我已经阅读了Webpack文档的一部分,其中解释了为什么在使用
我该如何停止这个功能?
module.loaders
语法设置加载器时,Webpack会对HTML进行缩小。但我找不到任何地方说明如何停止这个功能。我正在使用pug-loader
和html-webpack-plugin
来处理我的模板,但Webpack总是将它们输出为缩小的HTML。我该如何停止这个功能?
{
test: /\.pug$/,
use: 'pug-loader'
}
new HtmlWebpackPlugin({
title: 'Home',
filename: 'index.html',
template: './src/index.pug',
inject: 'head',
chunks: ['app'],
hash: true
}),
dist
文件夹中的文件仍然被压缩了。 - Dan