Html-webpack-plugin: needs to do not minify html with pug(jade)

Created on 9 Jul 2016  路  4Comments  路  Source: jantimon/html-webpack-plugin

I know setting a loader using the module.loaders syntax will cause html minification,

but I really needs pretty html files, because I compiled pug to jekyll html, if jekyll cannot recognize it, and I try to set minify to false or preserveLineBreaks: true, but no work.

so anyway to get pretty html files with the module.loaders syntax?

Most helpful comment

This should work in the loader options for pug-html-loader itself

  loaders: [
    {
      test: /\.pug$/,
      exclude: /(node_modules)/,
      loader: "pug-html",
      query: {
        pretty: true
      }
    }
  ]

All 4 comments

This should work in the loader options for pug-html-loader itself

  loaders: [
    {
      test: /\.pug$/,
      exclude: /(node_modules)/,
      loader: "pug-html",
      query: {
        pretty: true
      }
    }
  ]

@evandertino thx, it works

This doesn't work for me, can you provide a complete example ? Thanks ;)

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laruiss picture laruiss  路  3Comments

meleyal picture meleyal  路  3Comments

hp8wvvvgnj6asjm7 picture hp8wvvvgnj6asjm7  路  3Comments

ghaiklor picture ghaiklor  路  3Comments

lcxfs1991 picture lcxfs1991  路  4Comments