2017-08-28 131 views
0

当我使用ExtractTextPlugin提取.pug文件时,它会将其转换为html,但会缩小,因为它会消除噪音?使用插件unminify pug ExtractTextPlugin

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

.... 


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

回答

0

这是我用来输出unminified HTML:

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