比如index.html'./head.html'index'./footer.html'生成出来之后是Documentindexhtml-loader貌似不能做到这种
2 回答
婷婷同学_
TA贡献1844条经验 获得超8个赞
安装cnpminstallhtml-loader--save-dev;<%=require('html-loader!./common.html')%>
人到中年有点甜
TA贡献1895条经验 获得超7个赞
Thebestintegrationwithwebpackandyourindex.htmlfile,wouldbehtml-webpack-plugin.Notonlydoesitinjectcss/javascriptbundlesintoatemplatedhtmlfile.Butitalsogivesyoufine-grainedcontrol.Ifyouaretryingtousemultipletemplatesandincludethemintoeachother,thenyoumaywanttolookintoadifferenttemplatinglanguagelikePug/JadeorHandlebars.(Eachofthesehavespecificwebpackloadersfortheirrespectivetypes).
添加回答
举报
0/150
提交
取消