This example illustrates how to leverage the import()
syntax to create ContextModules which are separated into separate chunks for each module in the ./templates
folder.
{{example.js}}
- a.js
- b.js
- c.js
- foo.js
- baz.js
- bar.js
All templates are of this pattern:
module.exports = function() {
return "This text was generated by template X";
}
or (for ES6):
var foo = "foo";
export default foo;
{{js/output.js}}
{{stdout}}
{{min:stdout}}