-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于清除注释的问题 #21
Comments
请提供demo |
这是我专门为重现问题建的一个demo,这是地址 https://github.com/tuhongwei/issueDemo ,clone下来之后 运行npm install,然后运行gulp dev |
我调试了 art-template-loader/src/index:10,发现 |
建议升级 webpack 到 3,然后 webpack.config.js 第 29 行删除 |
那我换成最新版的webpack试试 |
我升级到了最新版的webpack还是不行,代码已提交 |
webpack3 的配置不兼容 v1 的,如果你运行 webpack3 没有报错你应该检查下 webpack 版本是否已经到了 v3 了。 |
webpack版本在控制台有输出,已经从原来的v1版本变成了v3版本,然后我又把webpack的配置换成v3的配置试了还是不行 |
Same here! Cannot minify HTML sources |
same here... |
同样的问题,参数看起来不起任何作用。 |
same issue, webpack is 4.6.0 |
试试 cache: false,我也是同样的问题,但后来过了一段时间又好了,也没有改变什么设置。 这是我的配置,可以参考下
|
@sbmzhcn LGTM |
我用的是webpack,然后我在webpack里面的设置是这样的
{ test: /.art$/, loader: "art-template-loader", options: {
htmlResourceRoot: path.join(__dirname, 'img'),
root: path.resolve(__dirname),
// htmlMinifier: htmlMinifier,
htmlMinifierOptions: {
removeComments: true,
collapseWhitespace: true,
minifyCSS: true,
minifyJS: true
}
}
},为了清除掉注释,但是最后没有生效,然后我用npm安装了html-minifier的包,var htmlMinifier = require('html-minifier').minify;也试了这种var htmlMinifier = require('html-minifier'),最后都没生效,请问这是什么原因?(我是把,art文件用require引入的)
The text was updated successfully, but these errors were encountered: