mirror of https://github.com/webpack/webpack.git
37 lines
477 B
Markdown
37 lines
477 B
Markdown
This is a simple example that shows the usage of WebAssembly.
|
|
|
|
WebAssembly modules can be imported like other async modules with `import` or `import()`.
|
|
When importing, they are downloaded and instantiated in a streaming way.
|
|
|
|
# example.js
|
|
|
|
```javascript
|
|
_{{example.js}}_
|
|
```
|
|
|
|
# math.js
|
|
|
|
```javascript
|
|
_{{math.js}}_
|
|
```
|
|
|
|
# dist/output.js
|
|
|
|
```javascript
|
|
_{{dist/output.js}}_
|
|
```
|
|
|
|
# Info
|
|
|
|
## Unoptimized
|
|
|
|
```
|
|
_{{stdout}}_
|
|
```
|
|
|
|
## Production mode
|
|
|
|
```
|
|
_{{production:stdout}}_
|
|
```
|