2012-04-05 20:59:01 +08:00
|
|
|
# example.js
|
|
|
|
|
|
|
|
|
|
``` javascript
|
2019-04-05 05:04:47 +08:00
|
|
|
_{{example.js}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# 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";
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2018-01-05 04:39:29 +08:00
|
|
|
# dist/output.js
|
2012-04-05 20:59:01 +08:00
|
|
|
|
|
|
|
|
``` javascript
|
2019-04-05 05:04:47 +08:00
|
|
|
_{{dist/output.js}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Info
|
|
|
|
|
|
2017-12-14 17:09:09 +08:00
|
|
|
## Unoptimized
|
2012-04-05 20:59:01 +08:00
|
|
|
|
|
|
|
|
```
|
2019-04-05 05:04:47 +08:00
|
|
|
_{{stdout}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
|
2017-12-14 17:09:09 +08:00
|
|
|
## Production mode
|
2012-04-05 20:59:01 +08:00
|
|
|
|
|
|
|
|
```
|
2019-04-05 05:04:47 +08:00
|
|
|
_{{production:stdout}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Code Splitting
|
|
|
|
|
|
2013-02-25 19:30:25 +08:00
|
|
|
See [this example combined with code splitting](../code-splitted-require.context)
|