index.html页面引用了 a.js b.js c.js
通过grunt打包之后生成dist/build.js
那发布的时候 index.html是不是要手动把引用a.js b.js c.js改成引用dist/build.js
现在本人解决方法是 页面直接引用压缩后的build.js 但是老是感觉怪怪的,grunt下有没有什么插件可以直接在压缩打包之后直接把页面上引用的资源replace成打包生成的路径?
index.html页面引用了 a.js b.js c.js
通过grunt打包之后生成dist/build.js
那发布的时候 index.html是不是要手动把引用a.js b.js c.js改成引用dist/build.js
现在本人解决方法是 页面直接引用压缩后的build.js 但是老是感觉怪怪的,grunt下有没有什么插件可以直接在压缩打包之后直接把页面上引用的资源replace成打包生成的路径?
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.7k 阅读✓ 已解决
3 回答2.3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
可以用这个插件:
grunt-dom-munger
DEMO: