webpack打包配置禁止html标签全部转为小写

用webpack打包页面,发现html中特别写的用来给后端识别的大写标签全部被转为了小写标签,这时候需要将加一个配置 ,caseSensitive:true ,禁止大小写转换。

webpack配置:

 {
                test: /\.html$/,
                use: [
                    {
                        loader: "html-loader",
                        options: {
                            minimize: true,// 加载器切换到优化模式,启用压缩。
                            caseSensitive:true // 以区分大小写的方式处理属性(对于自定义HTML标记很有用),即禁止html标签全部转为小写

                        }
                    }
                ]
            }

参考文档链接:

https://github.com/kangax/html-minifier#options-quick-reference

https://github.com/jantimon/html-webpack-plugin#options