From 0972fa90a107ef21242ccfe8973e7ab24bf3cd78 Mon Sep 17 00:00:00 2001 From: a2nr Date: Sat, 5 Sep 2026 10:18:13 +0700 Subject: [PATCH] fix(spice): use Vite BASE_URL for ngspice default asset base --- frontend/src/simulation/spice/wasm/NgSpiceInteractive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/simulation/spice/wasm/NgSpiceInteractive.ts b/frontend/src/simulation/spice/wasm/NgSpiceInteractive.ts index cb1d6bee..0d72e62c 100644 --- a/frontend/src/simulation/spice/wasm/NgSpiceInteractive.ts +++ b/frontend/src/simulation/spice/wasm/NgSpiceInteractive.ts @@ -75,7 +75,7 @@ interface SubscriberCallbacks { onStderr?: (line: string) => void; } -const DEFAULT_ASSET_BASE = '/wasm/ngspice-interactive/'; +const DEFAULT_ASSET_BASE = `${import.meta.env?.BASE_URL ?? '/'}wasm/ngspice-interactive/`.replace(/\/+/g, '/'); export class NgSpiceInteractive { private worker: Worker | null = null;