Skip to content

Commit

Permalink
Trying to fix Vite example
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Oct 14, 2024
1 parent 2df2564 commit 845dfd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/wasmer.sh/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import "xterm/css/xterm.css";
import type { Instance } from "@wasmer/sdk";
import { Terminal } from "xterm";
import { FitAddon } from "xterm-addon-fit";
// @ts-ignore
import WasmModule from "@wasmer/sdk/wasm?url";

const encoder = new TextEncoder();
const params = new URLSearchParams(window.location.search);
Expand All @@ -22,7 +24,7 @@ async function main() {
// See https://github.com/wasmerio/wasmer-js/issues/373
const { Wasmer, init, Directory } = await import("@wasmer/sdk");

await init({log: logFilter});
await init({log: logFilter, module: WasmModule});

const term = new Terminal({ cursorBlink: true, convertEol: true });
const fit = new FitAddon();
Expand Down
2 changes: 1 addition & 1 deletion examples/wasmer.sh/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
"Cross-Origin-Embedder-Policy": "require-corp",
},
fs: {
allow: ["../.."],
allow: ["../..", "node_modules/@wasmer/sdk/dist"],
},
},
build: {
Expand Down

0 comments on commit 845dfd1

Please sign in to comment.