load simplite template and compile
install
npm install simplite-loader --save-dev
let tpl = import tpl from ('./path/xxx/index.tpl')
domNode.innerHTML = tpl(data)
if you use webpack, you can use it at webpack.config.js:
module: {
rules: [
{
test: /\.tpl$/,
exclude: /node_modules/,
use: {
loader: 'simplite-loader'
}
}
]
}