refactr
This commit is contained in:
@@ -47,10 +47,12 @@ export const initRhaiMode = (CodeMirror: any) => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Function to preload all WASM modules used by the application
|
||||
export const loadAllWasm = async (): Promise<void> => {
|
||||
try {
|
||||
// Load Rhai CodeMirror WASM
|
||||
|
||||
await loadRhaiWasm();
|
||||
|
||||
// Load Script Runner WASM by creating and immediately terminating a worker
|
||||
@@ -79,9 +81,9 @@ export const loadAllWasm = async (): Promise<void> => {
|
||||
};
|
||||
});
|
||||
|
||||
console.log("✅ All WASM modules loaded successfully");
|
||||
console.log("All WASM modules loaded successfully");
|
||||
} catch (error) {
|
||||
console.error("❌ Failed to load WASM modules:", error);
|
||||
console.error("Failed to load WASM modules:", error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user