html-loader 和 file-loader 問題
如果html-loader對index.html進行處理,index.html中<%%>無法解析,,,
但是如果不使用html-loader對index.html處理,則index.html中的img的href地址會不變,導(dǎo)致找不到圖片
請問該怎么解決
如果html-loader對index.html進行處理,index.html中<%%>無法解析,,,
但是如果不使用html-loader對index.html處理,則index.html中的img的href地址會不變,導(dǎo)致找不到圖片
請問該怎么解決
2017-03-05
舉報
2017-03-05
解決了,html-loader會把html后綴的文件當(dāng)做字符串來處理,你把index.html后綴改成tpl,使用ejs-loader去處理這個模板文件,這樣里面就能識別<%%>了
2017-03-05
同問,也遇到這個問題