<%= require('html-loader!./html-header.html') %
来源:3-6 webpack对html模板的处理
低调的豪哥
2017-12-19
$ npm install html-loader --save-dev 安装成功后执行webpack
<%= require('html-loader!./html-header.html') % 这个语句的<%=%>是失效的
ERROR in Error: Child compilation failed:
Cannot find module 'clean-css'
Child html-webpack-plugin for "view\login.html":
+ 3 hidden modules
Child html-webpack-plugin for "view\index.html":
+ 4 hidden modules
ERROR in Cannot find module 'clean-css'
@ ./~/html-webpack-plugin/lib/loader.js!./src/view/index.html 4:10-56
Child extract-text-webpack-plugin:
+ 2 hidden modules
写回答
1回答
-
低调的豪哥
提问者
2017-12-19
已解决,,我重新安装了下html-loader,改了路径。就好 了!
012017-12-19
相似问题