File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1010 import { base } from " $app/paths" ;
1111 import { AnsiUp } from " ansi_up" ;
1212
13- import { init , eval_modu , modu_version } from " modu-wasm" ;
14-
1513 let language = new Compartment , tabsize = new Compartment ;
1614 let moduVersion = " " ;
1715
@@ -71,11 +69,14 @@ yap("Hello, World!");
7169 });
7270
7371 let view;
72+ var wasm;
7473
7574 onMount (async () => {
7675 if (browser ) {
77- await init ();
78- moduVersion = modu_version ();
76+ wasm = await import (" modu-wasm" );
77+
78+ await wasm .init ();
79+ moduVersion = wasm .modu_version ();
7980
8081 view = new EditorView ({
8182 state ,
@@ -110,7 +111,7 @@ yap("Hello, World!");
110111 return ;
111112 }
112113
113- let result = eval_modu (code );
114+ let result = wasm . eval_modu (code );
114115 output = ansi .ansi_to_html (result );
115116
116117 setTimeout (() => {
Original file line number Diff line number Diff line change 1+ export const ssr = false ;
2+ export const prerender = false ;
You can’t perform that action at this time.
0 commit comments