Fix loading analyzer and bust caches

This commit is contained in:
momo5502
2025-07-09 19:09:16 +02:00
parent b7dc284a9d
commit 7f15b42d18
3 changed files with 18 additions and 4 deletions

View File

@@ -76,8 +76,11 @@ export class Emulator {
this.terminateReject = reject;
});
const cacheBuster = import.meta.env.VITE_BUILD_TIME || Date.now();
this.worker = new Worker(
/*new URL('./emulator-worker.js', import.meta.url)*/ "./emulator-worker.js",
/*new URL('./emulator-worker.js', import.meta.url)*/ "./emulator-worker.js?" +
cacheBuster,
);
this.worker.onerror = this._onError.bind(this);
@@ -93,6 +96,7 @@ export class Emulator {
options: translateSettings(settings),
persist: settings.persist,
wasm64: settings.wasm64,
cacheBuster: import.meta.env.VITE_BUILD_TIME || Date.now(),
},
});
}

View File

@@ -98,7 +98,9 @@ export class Playground extends React.Component<
application: undefined,
allowWasm64: false,
};
}
componentDidMount(): void {
memory64().then((allowWasm64) => {
this.setState({ allowWasm64 });
});