[wasm] fix: let vite ignore the dynamic import of node:fs
This commit is contained in:
parent
6a56cc8433
commit
7ac92f9341
@ -11,7 +11,7 @@ function loader() {
|
||||
const url = new URL('um_wasm_bg.wasm', import.meta.url);
|
||||
const wasm =
|
||||
url.protocol === 'file:'
|
||||
? import('node:f' + 's/promises')
|
||||
? import(/* @vite-ignore */ 'node:f' + 's/promises')
|
||||
.then((fs) => fs.readFile(url))
|
||||
.catch((err) => {
|
||||
console.log('read wasm failed', err);
|
||||
|
Loading…
Reference in New Issue
Block a user