From 7ac92f9341eb603dc9ee196bf7b7b6d7a28de35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sun, 15 Sep 2024 15:41:43 +0100 Subject: [PATCH] [wasm] fix: let vite ignore the dynamic import of node:fs --- um_wasm_loader/src/loader.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/um_wasm_loader/src/loader.mjs b/um_wasm_loader/src/loader.mjs index d4f6de3..ddd1565 100644 --- a/um_wasm_loader/src/loader.mjs +++ b/um_wasm_loader/src/loader.mjs @@ -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);