Webpack
Less than 1 minute
Webpack
Module has its own loader for files with the .hmpl
extension. You can include hmpl-loader and use the template language syntax in separate files:
main.hmpl
<div>
{
{
"src":"/api/test"
}
}
</div>
main.js
const templateFn = require("./main.hmpl");
const elementObj = templateFn();
For the loader to work, it is better to use versions 0.0.2
or higher.