Fix the wasm2js example (#1750)

This needed and update now that we're explicitly importing `*.wasm` to
import `*.js` instead. Additionally this was moved over to the `web`
target to avoid needing Webpack

Closes #1743
This commit is contained in:
Alex Crichton
2019-09-03 16:05:23 -04:00
committed by GitHub
parent 1f39a3045f
commit 4e19ead71b
7 changed files with 11 additions and 47 deletions

View File

@ -1,4 +1,4 @@
// Note that since we're not using `WebAssembly` we can do a synchronous import
// here!
import { run } from './pkg/wasm2js';
run();
// Import our JS shim and initialize it, executing the start function when it's
// ready.
import init from './pkg/wasm2js.js';
init();