webpack/examples/code-splitting-native-impor.../template.md

501 B

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/

  • foo.js
  • baz.js
  • bar.js

All templates are of this pattern:

_{{templates/foo.js}}_

dist/output.js

_{{dist/output.js}}_

Info

Unoptimized

_{{stdout}}_

Production mode

_{{production:stdout}}_