webpack/examples/require.context/template.md

44 lines
478 B
Markdown
Raw Normal View History

2012-04-05 20:59:01 +08:00
# example.js
``` 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}}
```
# Code Splitting
2013-02-25 19:30:25 +08:00
See [this example combined with code splitting](../code-splitted-require.context)