Load playground wasm assets through Vite
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import initRuntime, { evaluateProject } from 'decodal-wasm';
|
||||
import runtimeWasmUrl from 'decodal-wasm/decodal_wasm_bg.wasm?url';
|
||||
import initTools, { formatSource } from 'decodal-language-tools';
|
||||
import toolsWasmUrl from 'decodal-language-tools/decodal_language_tools_bg.wasm?url';
|
||||
import { EditorView, basicSetup } from 'codemirror';
|
||||
import { keymap } from '@codemirror/view';
|
||||
import { decodal } from 'decodal-codemirror';
|
||||
@@ -243,7 +245,7 @@ function compareNodes(a, b) {
|
||||
}
|
||||
|
||||
try {
|
||||
await Promise.all([initRuntime(), initTools()]);
|
||||
await Promise.all([initRuntime(runtimeWasmUrl), initTools(toolsWasmUrl)]);
|
||||
run.disabled = false;
|
||||
formatButton.disabled = false;
|
||||
status.textContent = '';
|
||||
|
||||
Reference in New Issue
Block a user