2017-03-26 18:45:49 +08:00
|
|
|
# example.js
|
|
|
|
|
2020-02-28 21:44:20 +08:00
|
|
|
This example illustrates how to specify the chunk name in `require.ensure()` and `import()` to separated modules into separate chunks manually.
|
2017-03-26 18:45:49 +08:00
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```javascript
|
|
|
|
_{{example.js}}_
|
2017-03-26 18:45:49 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
# templates/
|
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
- foo.js
|
|
|
|
- baz.js
|
|
|
|
- bar.js
|
2017-03-26 18:45:49 +08:00
|
|
|
|
|
|
|
All templates are of this pattern:
|
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```javascript
|
|
|
|
_{{templates/foo.js}}_
|
2017-03-26 18:45:49 +08:00
|
|
|
```
|
|
|
|
|
2018-01-05 04:39:29 +08:00
|
|
|
# dist/output.js
|
2017-03-26 18:45:49 +08:00
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```javascript
|
|
|
|
_{{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
|
|
|
|
|
|
|
```
|
2019-04-05 05:04:47 +08:00
|
|
|
_{{stdout}}_
|
2017-03-26 18:45:49 +08:00
|
|
|
```
|
|
|
|
|
2017-12-14 17:09:09 +08:00
|
|
|
## Production mode
|
2017-03-26 18:45:49 +08:00
|
|
|
|
|
|
|
```
|
2019-04-05 05:04:47 +08:00
|
|
|
_{{production:stdout}}_
|
2017-03-26 18:45:49 +08:00
|
|
|
```
|