Answer the question
In order to leave comments, you need to log in
How to make files with four spaces after assembly in webpack?
Guys, tell me, please. I'm using webpack to build. I need the files to be indented: 4 spaces. I have 2.
new HtmlWebpackPlugin({
filename: 'index.html',
chunks: ['index', 'common'],
template: PATH.source + '/pages/index/index.pug'
})
module.exports = function () {
return {
module: {
rules: [
{
test: /\.pug$/,
loader: 'pug-loader',
options: {
pretty: true
}
}
]
}
}
}
Answer the question
In order to leave comments, you need to log in
Try passing four spaces to the pretty option. According to the documentation , this option must accept either true/false or a string with the required number of indents.pretty: ' '
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question