You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build in server side, when use import() in lifecycle hook, show error window is not defined
i check in .nuxt/dist/server/server.mjs, found import() result at toplevel , like this :
constentry$1=(ctx)=>entry(ctx);window.test=123;// this is my import resultconsttest=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__: null},Symbol.toStringTag,{value: "Module"}));
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
I think turning inlineDynamicImports off for ssr.target = 'node' by default makes sense. I assume this option was turned on for ssr.target = 'webworker'.
Forwarded from downstream issue:
dynamic import
correctly inonMounted
nuxt/nuxt#13819 by @baixiaoyu2997Environment
Nuxt project info: 14:31:07
Darwin
v16.14.0
3.0.0-rc.1-27510703.46ecbc5
pnpm@6.32.9
vite
target
-
-
Reproduction
https://stackblitz.com/edit/nuxt-starter-jvkzzr?file=package.json
run
yarn generate
inTerminal
Describe the bug
build in
server side
, when useimport()
inlifecycle hook
, show errorwindow is not defined
i check in
.nuxt/dist/server/server.mjs
, foundimport()
result at toplevel , like this :Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: