-
Notifications
You must be signed in to change notification settings - Fork 699
Labels
Description
Reproduction link or steps
dynamic import cause ReferenceError: __vitePreload is not defined error in ssr project
What is expected?
no error
What is actually happening?
ReferenceError: __vitePreload is not defined
source:
// for issue test
const { createRcpRouter } = await import("../modules/service");
dist:
const { createRcpRouter } = await __vitePreload(async () => {
const { createRcpRouter: createRcpRouter$1 } = await import("./assets/service-BQNCVzyX.js");
return { createRcpRouter: createRcpRouter$1 };
}, __VITE_IS_MODERN__ ? __VITE_PRELOAD__ : void 0);
System Info
System:
OS: Linux 5.15 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 7.53 GB / 11.69 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 22.9.0 - ~/.asdf/installs/nodejs/22.9.0/bin/node
npm: 10.8.3 - ~/.asdf/plugins/nodejs/shims/npm
pnpm: 9.6.0 - ~/.local/share/pnpm/pnpmAny additional comments?
No response
Reactions are currently unavailable