-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
🐛 BUG: Can't use <script setup> with Vue 3 #1190
Comments
The example is reproducible. In Astro, Vue is supported trough Vue Loader. Unfortunately, this "new" feature is not supported in the Vue loader. There is an open issue in the Vue loader project: vuejs/vue-loader#1804 Currently supported in Astro:
Supported in native Vue with less boilerplate code:
|
Are you sure that we use Vue Loader? I don't see a reference to it. Anyways, thanks for confirming the bug! |
I guess the fix is to use the Vue compiler directly. |
It's a sugar syntax that vue-loader, and for example Vue plugin for Vite, have implemented and works fine, despite the previous comments. It's not going to be part of the Vue compiler. So in my opinion, there is no point to wait for anything else than Vite, because otherwise we will have to add support for it to Snowpack Vue plugin. |
Thanks for the report! We believe that this has been fixed in astro v0.21, going out today. Let us know if you can still reproduce the issue after updating to v0.21 and we'll be happy to take a look. |
What package manager are you using?
yarn
What operating system are you using?
Windows
Describe the Bug
I can't use the <script setup> syntax with Vue 3, therefore I am not able to take advantage of some features of this framework.
Steps to Reproduce
<script setup>
, thus properties are always exposed. I expected<script setup>
to work as usual.[Vue warn]: Property "count" was accessed during render but is not defined on instance.
Link to Minimal Reproducible Example (Optional)
https://github.com/Miguelklappes/astro-test
The text was updated successfully, but these errors were encountered: