How can I provide parameters for webpack html-loader interpolation? -
in html-loader documentation there example
require("html?interpolate=require!./file.ftl"); <#list list list> <a href="${list.href!}" />${list.name}</a> </#list> <img src="${require(`./images/gallery.png`)}"> <div>${require('./components/gallery.html')}</div>
where "list" come from? how can provide parameters interpolation scope?
i template-string-loader does:
var template = require("html?interpolate!./file.html")({data: '123'});
and in file.html
<div>${scope.data}</div>
but doesn't work. have try mix template-string-loader html-loader doesn't works. use template-string-loader images in html not transformed webpack.
any ideas? thank you
Comments
Post a Comment