unminify pug using plugin ExtractTextPlugin

292 views Asked by At

When I extract a .pug file with ExtractTextPlugin, it converts it to html but minify, as it unminify??

const extractHTML = new ExtractTextPlugin('[name]-pug.html');

....


{
    test: /\.pug$/,
    use: extractHTML.extract({
        fallback: "style-loader",
        use: ['html-loader' ,'pug-html-loader'],
        options: {
            pretty: true
        }
    })
}
1

There are 1 answers

0
Ahmad Alfy On

This is what I used to output unminified HTML:

  {
    test: /\.pug$/,
    include: path.join(__dirname, 'src'),
    use: [{
      loader: 'pug-loader',
      options: { pretty: true },
    }],
  },