webpack/examples/wasm-simple/template.md

37 lines
473 B
Markdown
Raw Normal View History

2017-10-30 20:56:57 +08:00
This very simple example shows usage of WebAssembly.
2019-05-24 19:54:49 +08:00
WebAssembly modules can be imported like other async modules with `import await` or `import()`.
They are downloaded and instantiated in a streaming way when importing.
2017-10-30 20:56:57 +08:00
# example.js
```javascript
_{{example.js}}_
2017-10-30 20:56:57 +08:00
```
# math.js
```javascript
_{{math.js}}_
2017-10-30 20:56:57 +08:00
```
# dist/output.js
2017-10-30 20:56:57 +08:00
```javascript
_{{dist/output.js}}_
2017-10-30 20:56:57 +08:00
```
# Info
## Unoptimized
2017-10-30 20:56:57 +08:00
```
_{{stdout}}_
2017-10-30 20:56:57 +08:00
```
## Production mode
2017-10-30 20:56:57 +08:00
```
_{{production:stdout}}_
2017-10-30 20:56:57 +08:00
```