diff --git a/pal/wasm/wasm-minigame.ts b/pal/wasm/wasm-minigame.ts index 578b290091c..3f4e2bca437 100644 --- a/pal/wasm/wasm-minigame.ts +++ b/pal/wasm/wasm-minigame.ts @@ -22,9 +22,6 @@ THE SOFTWARE. */ -// fsUtils is defined in engine-adapter -declare const fsUtils: any; - export function instantiateWasm (wasmUrl: string, importObject: WebAssembly.Imports): Promise { wasmUrl = `cocos-js/${wasmUrl}`; return WebAssembly.instantiate(wasmUrl, importObject); @@ -32,7 +29,7 @@ export function instantiateWasm (wasmUrl: string, importObject: WebAssembly.Impo export function fetchBuffer (binaryUrl: string): Promise { return new Promise((resolve, reject) => { - fsUtils.readArrayBuffer(`cocos-js/${binaryUrl}`, (err, arrayBuffer) => { + globalThis.fsUtils.readArrayBuffer(`cocos-js/${binaryUrl}`, (err, arrayBuffer) => { if (err) { reject(err); return;