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;