antfu-collective / vitesse

🏕 Opinionated Vite + Vue Starter Template
https://vitesse.netlify.app/
MIT License
8.79k stars 932 forks source link

I can‘t use ref in the vue^3.3.4and vite^4.4.5 #512

Closed nightmare-mio closed 10 months ago

nightmare-mio commented 10 months ago

Describe the bug

this's my package.json

image

this's a new project,without config

image

this's new project,"Helloworld" can operate normally,but ref can't

image image

Reproduction

no

System Info

System:
    OS: Windows 11 10.0.22621
    CPU: (8) x64 Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz
    Memory: 7.46 GB / 23.84 GB
  Binaries:
    Node: 20.3.1 - D:\environment\node-v20.3.1-win-x64\node.EXE
    Yarn: 1.22.19 - D:\environment\node-v20.3.1-win-x64\yarn.CMD
    npm: 9.6.7 - D:\environment\node-v20.3.1-win-x64\npm.CMD
    pnpm: 8.8.0 - D:\environment\node-v20.3.1-win-x64\pnpm.CMD
  Browsers:
    Internet Explorer: 11.0.22621.1

Used Package Manager

pnpm

Validations

Ares-Chang commented 10 months ago

Please refer to unplugin-auto-import, which can refer to APIs automatically.

This project has been configured with plugins so you don't have to actively reference them

Otherwise, quote 'ref' proactively

import { computed, ref } from 'vue'

const count = ref(0)
const doubled = computed(() => count.value * 2)
antfu commented 10 months ago

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required