handlebars-webpack-plugin
handlebars-webpack-plugin copied to clipboard
json
Hi,
This is related to this issue
For me a really good solution would be to keep the data json source but add the ability to have an array of json files and then in addtion have a pageJson that would use [name].json in the same way the output html does at the moment:
output: path.join(process.cwd(), "build", "[name].html"),
so
pageJson: path.join(process.cwd(), "src/hbs/templates", "[name].json"),
Would this be an easy feature to add? I might fork if I have time
Thanks
I am looking for something like "pageJson" too. I have several .hbs files that I want to build but each one has a corresponding json file.
Just a reminder: You can use multiple handlebars-webpack-plugins to assign specific json-data to templates.
As for globbing json, i will not support this, since there are too many variations to thoroughly support this feature and there are multiple ways to do this manually.