mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-28 15:31:02 +00:00
Fix loading analyzer and bust caches
This commit is contained in:
@@ -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(),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -98,7 +98,9 @@ export class Playground extends React.Component<
|
||||
application: undefined,
|
||||
allowWasm64: false,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
memory64().then((allowWasm64) => {
|
||||
this.setState({ allowWasm64 });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user