webpack/examples/wasm-simple/template.md

37 lines
477 B
Markdown
Raw Normal View History

2020-04-26 01:24:53 +08:00
This is a simple example that shows the usage of WebAssembly.
2017-10-30 20:56:57 +08:00
2020-08-04 20:15:08 +08:00
WebAssembly modules can be imported like other async modules with `import` or `import()`.
2020-04-29 04:30:56 +08:00
When importing, they are downloaded and instantiated in a streaming way.
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
```