2017-03-26 18:45:49 +08:00
|
|
|
# example.js
|
|
|
|
|
|
|
|
This example illustrates how to specify chunk name in `require.ensure()` and `import()` to separated modules into separate chunks manually.
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
{{example.js}}
|
|
|
|
```
|
|
|
|
|
|
|
|
# templates/
|
|
|
|
|
|
|
|
* foo.js
|
|
|
|
* baz.js
|
|
|
|
* bar.js
|
|
|
|
|
|
|
|
All templates are of this pattern:
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
{{templates/foo.js}}
|
|
|
|
```
|
|
|
|
|
2018-01-05 04:39:29 +08:00
|
|
|
# dist/output.js
|
2017-03-26 18:45:49 +08:00
|
|
|
|
|
|
|
``` javascript
|
2018-01-05 04:39:29 +08:00
|
|
|
{{dist/output.js}}
|
2017-03-26 18:45:49 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
# Info
|
|
|
|
|
2017-12-14 17:09:09 +08:00
|
|
|
## Unoptimized
|
2017-03-26 18:45:49 +08:00
|
|
|
|
|
|
|
```
|
|
|
|
{{stdout}}
|
|
|
|
```
|
|
|
|
|
2017-12-14 17:09:09 +08:00
|
|
|
## Production mode
|
2017-03-26 18:45:49 +08:00
|
|
|
|
|
|
|
```
|
2017-12-14 17:09:09 +08:00
|
|
|
{{production:stdout}}
|
2017-03-26 18:45:49 +08:00
|
|
|
```
|