Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: update WASI example to use import.meta.url
  • Loading branch information
guybedford authored Aug 28, 2021
commit b25a9144a29f6acb5b9b7c69b5ad21036f4c6069
2 changes: 1 addition & 1 deletion doc/api/wasi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const wasi = new WASI({
});
const importObject = { wasi_snapshot_preview1: wasi.wasiImport };

const wasm = await WebAssembly.compile(fs.readFileSync('./demo.wasm'));
const wasm = await WebAssembly.compile(fs.readFileSync(new URL('./demo.wasm', import.meta.url)));
const instance = await WebAssembly.instantiate(wasm, importObject);

wasi.start(instance);
Expand Down