Back to Webpack

example.js

examples/require.context/template.md

5.106.2481 B
Original Source

example.js

javascript
_{{example.js}}_

templates/

  • a.js
  • b.js
  • c.js

All templates are of this pattern:

javascript
module.exports = function() {
	return "This text was generated by template X";
}

dist/output.js

javascript
_{{dist/output.js}}_

Info

Unoptimized

_{{stdout}}_

Production mode

_{{production:stdout}}_

Code Splitting

See this example combined with code splitting