Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 651 Bytes

File metadata and controls

51 lines (36 loc) · 651 Bytes

example.js

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}}

templates/

  • 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

{{js/output.js}}

Info

Uncompressed

{{stdout}}

Minimized (uglify-js, no zip)

{{min:stdout}}