Skip to content

Cannot find name $ref (use Ref Sugar (take 2)) #617

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

Closed
akirarika opened this issue Oct 20, 2021 · 1 comment
Closed

Cannot find name $ref (use Ref Sugar (take 2)) #617

akirarika opened this issue Oct 20, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@akirarika
Copy link

When I tried to use Ref Sugar (take 2), Vscode told me the same error as the title, but Vite works properly:

<script setup lang="ts">
let count = $ref(0);
</script>

<template>
  <button type="button" @click="count++">count is: {{ count }}</button>
</template>

In addition, my vite.config.ts is:

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue({
    refTransform: true,
  })]
})
@akirarika
Copy link
Author

I found a solution: #521

so sorry!

@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants