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

40 lines
501 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/
- foo.js
- baz.js
- bar.js
All templates are of this pattern:
```javascript
_{{templates/foo.js}}_
2016-12-10 12:59:20 +08:00
```
# dist/output.js
```javascript
_{{dist/output.js}}_
```
# Info
## Unoptimized
```
_{{stdout}}_
```
## Production mode
```
_{{production:stdout}}_
```