# 模板

# html.options

html.options: object

HTML 压缩。详细配置

默认值为:

{
  collapseWhitespace: true,
  minifyCSS: true,
  minifyJS: {
    compress: {
      drop_console: true
    }
  },
  processConditionalComments: true,
  removeComments: true,
  removeEmptyAttributes: true,
  removeScriptTypeAttributes: true,
  removeStyleLinkTypeAttributes: true
}

🌰 举个栗子:

balm.config = {
  html: {
    options: {
      collapseWhitespace: false,
      minifyCSS: true,
      minifyJS: {
        compress: {
          drop_console: false
        }
      }
    }
  }
  // 其他配置项...
};
Last Updated: 6 months ago