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

42 lines
552 B
Markdown
Raw Normal View History

# 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.
``` 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";
}
```
# js/output.js
``` javascript
{{js/output.js}}
```
# Info
## Uncompressed
```
{{stdout}}
```
## Minimized (uglify-js, no zip)
```
{{min:stdout}}
```