mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-07 20:19:51 +00:00
[wasm] fix: let vite ignore the dynamic import of node:fs
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user