Add options handling to hmpl-loader
Template language for displaying UI from server to client
Brought to you by:
antonmak1
Originally created by: antonmak1
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 - https://github.com/hmpl-lang/hmpl-loader/issues/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
Ticket changed by: antonmak1
Ticket changed by: antonmak1