2012-04-05 20:59:01 +08:00
|
|
|
# example.js
|
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```javascript
|
|
|
|
_{{example.js}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
# file.js
|
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```javascript
|
|
|
|
_{{file.js}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
# loader.js
|
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```javascript
|
|
|
|
_{{loader.js}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
2016-12-07 18:44:12 +08:00
|
|
|
# test.css
|
2012-04-05 20:59:01 +08:00
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```css
|
|
|
|
_{{test.css}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
2018-01-05 04:39:29 +08:00
|
|
|
# dist/output.js
|
2012-04-05 20:59:01 +08:00
|
|
|
|
2019-04-05 05:04:47 +08:00
|
|
|
```javascript
|
|
|
|
_{{dist/output.js}}_
|
2012-04-05 20:59:01 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
# Console output
|
|
|
|
|
2013-02-24 09:25:25 +08:00
|
|
|
Prints in node.js (`enhanced-require example.js`) and in browser:
|
2012-04-05 20:59:01 +08:00
|
|
|
|
|
|
|
```
|
|
|
|
{ answer: 42, foo: 'bar' }
|
|
|
|
{ foobar: 1234 }
|
|
|
|
{ foobar: 1234 }
|
|
|
|
```
|
|
|
|
|
|
|
|
# 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}}_
|
2013-12-16 06:30:25 +08:00
|
|
|
```
|
|
|
|
|
2017-12-14 17:09:09 +08:00
|
|
|
## Production mode
|
2013-12-16 06:30:25 +08:00
|
|
|
|
|
|
|
```
|
2019-04-05 05:04:47 +08:00
|
|
|
_{{production:stdout}}_
|
2013-12-16 06:30:25 +08:00
|
|
|
```
|