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
When using import.meta.globEager with a ref, if the top-level element has a class, Nuxt will throw a 500 error stating ref is not defined
Here is a simplified version of the code
<scriptsetup>constassets=import.meta.globEager('/assets/*.svg', { as: 'raw' });constsomeRef=ref('I am a ref');</script>
<template>
<divclass="this-class-causes-an-error">
</div>
</template>
Additional context
This may be not the same as #12806 since I am not using a dynamic path.
Logs
500
ref is not defined
at setup (./.nuxt/dist/server/server.mjs:3400:17)
at _sfc_main.setup (./.nuxt/dist/server/server.mjs:3430:23)
at callWithErrorHandling (./node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:157:22)
at setupStatefulComponent (./node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7084:29)
at setupComponent (./node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7039:11)
at renderComponentVNode (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:172:17)
at Module.ssrRenderComponent (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:608:12)
at default (./.nuxt/dist/server/server.mjs:2672:37)
at Module.ssrRenderSuspense (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:946:9)
at _sfc_ssrRender (./.nuxt/dist/server/server.mjs:2667:25)
The text was updated successfully, but these errors were encountered:
Environment
Windows_NT
v16.11.1
3.0.0-rc.4
npm@8.10.0
vite
-
-
-
Reproduction
https://stackblitz.com/edit/github-h5grgg?file=app.vue
Describe the bug
When using
import.meta.globEager
with aref
, if the top-level element has aclass
, Nuxt will throw a 500 error statingref is not defined
Here is a simplified version of the code
Additional context
This may be not the same as #12806 since I am not using a dynamic path.
Logs
The text was updated successfully, but these errors were encountered: