Skip to content

How can I provide parameters for webpack html-loader interpolation? #122

@547377507

Description

@547377507

require("html?interpolate=require!./file.ftl");

<#list list as list>
${list.name}
</#list>

${require('./components/gallery.html')}

Where does "list" come from? How can I provide parameters to the interpolation scope?

I would like to do something like template-string-loader does:

var template = require("html?interpolate!./file.html")({data: '123'});
and then in file.html

${scope.data}
But it doesn't work. I have try to mix the template-string-loader with the html-loader but it doesn't works. I could only use the template-string-loader but then the images in the HTML are not transformed by webpack.

Any ideas? Thank you

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions