fix(spice): use Vite BASE_URL for ngspice default asset base

This commit is contained in:
a2nr 2026-09-05 10:18:13 +07:00
parent 1397076dfd
commit 0972fa90a1
1 changed files with 1 additions and 1 deletions

View File

@ -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;