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

Popular posts from this blog

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -