使用插件ExtractTextPlugin unminify pug

时间:2017-08-28 23:34:56

标签: webpack pug loader extract-text-plugin

当我使用ExtractTextPlugin提取.pug文件时,它将其转换为html但缩小,因为它取消了?

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 个答案:

答案 0 :(得分:0)

这是我用来输出未分化的HTML的原因:

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