Add options handling to hmpl-loader
Opened this issue · 0 comments
antonmak1 commented
It is necessary to add options handling for loader. What should be done:
module.exports = {
module: {
rules: [
{
test: /\.hmpl$/i,
use: [{ loader: "hmpl-loader", options: { memo: true } }],
},
],
},
};
Also, needs to add a description of the options to the README.
In index.js you need to do it like this:
result.push(`const template = hmpl.compile(${template}, ${options});\n`);
docs for options - https://hmpl-lang.github.io/hmpl.html#options
related issue - hmpl-lang/hmpl-loader#1
Please take it if you have experience with node.js and webpack!
links:
repo - https://github.com/hmpl-lang/hmpl-loader
file - https://github.com/hmpl-lang/hmpl-loader/blob/master/index.js
readme - https://github.com/hmpl-lang/hmpl-loader/blob/master/README.md