New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_unref not defined on build #14203
Comments
This looks like it might be an auto import issue. cc: @antfu |
It will work on dev, and I'm stackblitz it still works fine in build, but you do get the error message saying that |
@antfu, I have also discovered a weird behavior, might be related to this (ignore underlined ESLint-related When I run On contrary, when I manually change what ESLint split into three lines to a single line statement, the error isn't shown anymore :) ...that is:
|
i get exactly the same error when using v-bind in css from a composable value (rc.8)... oddly enough it happens only in a couple files where others (also using the same v-bind from the same composable value) the error does not occur. i couldn't understand why it happens only when running after a build. dev is fine. @StevenJPx2 suggestion of importing |
This is a Vue bug, close as duplicated for #14550 |
Environment
Nuxt CLI v3.0.0-rc.4
RootDir: /Users/stevenjohn/Documents/Projects/SAFT/website-v2
Nuxt project info:
Darwin
v18.1.0
3.0.0-rc.3
yarn@1.22.15
vite
buildModules
,vite
,build
-
@vueuse/nuxt@8.7.4
Reproduction
Minimal reproduction
Describe the bug
When a value from a composable is used in a
v-bind
in CSS, it fails in previewing the build, giving the error_unref is not defined
.Glue fix for people who are facing this issue
Just add this to the top of your
vue
file wherever you have this use-case:What I've found
In
server.mjs
: it is resolving the composableref
value using_unref
instead of usingvue_cjs_prod.unref
. When I did that to the build file, it ran with no issue.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: