ES6 template string loader module for webpack
npm install template-string-loadernpm install template-string-loader
`` javascript`
var template = require("babel!template-string!./file.html")({data: '123'});
Example template:
` html`${scope.data}
The loader returns a function like below. Call the function with the data you want to pass to the template. That data is available on the scope param:
` javascript
module.exports = function(scope){
return
;
}
`Result:
` html
123
``