Skip to content
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

the tag add ref prop is error when build after(serious!!!!!) #4757

Closed
7 tasks done
jzfai opened this issue Aug 27, 2021 · 2 comments
Closed
7 tasks done

the tag add ref prop is error when build after(serious!!!!!) #4757

jzfai opened this issue Aug 27, 2021 · 2 comments

Comments

@jzfai
Copy link

jzfai commented Aug 27, 2021

Describe the bug

image

Reproduction

1.yarn create vite
2.cd vite-project

look for HelloWorld.vue component add ref="refHelloWorld" props
image

  1. yarn run build
  2. yarn run serve(to priview)
    image

System Info

{
  "name": "vite-project",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vue-tsc --noEmit && vite build",
    "serve": "vite preview"
  },
  "dependencies": {
    "vue": "^3.2.6"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^1.6.0",
    "@vue/compiler-sfc": "^3.0.5",
    "typescript": "^4.3.2",
    "vite": "^2.5.1",
    "vue-tsc": "^0.2.2"
  }
}

Used Package Manager

yarn

Logs

vendor.5002e4fc.js:1 ReferenceError: refHelloWorld is not defined
    at Proxy.<anonymous> (index.625b353c.js:1)
    at Ft (vendor.5002e4fc.js:1)
    at se.fn (vendor.5002e4fc.js:1)
    at se.run (vendor.5002e4fc.js:1)
    at B (vendor.5002e4fc.js:1)
    at U (vendor.5002e4fc.js:1)
    at V (vendor.5002e4fc.js:1)
    at y (vendor.5002e4fc.js:1)
    at ne (vendor.5002e4fc.js:1)
    at mount (vendor.5002e4fc.js:1)

Validations

@github-actions
Copy link

Hello @jzfai. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.

@sodatea
Copy link
Member

sodatea commented Aug 27, 2021

Never mind. I got it. It's a bug in Vue 3 regarding <script setup>. Already reported vuejs/core#4431

@sodatea sodatea closed this as completed Aug 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants