Support the <script setup> syntax in SFCs
See original GitHub issueFeature Request
See https://v3.vuejs.org/api/sfc-script-setup.html
Currently there are no errors with the new <script setup>
syntax, but variables defined in the script are displayed (e.g. component imports, computed etc.) as dimmed when they are never read in the script itself, because you don’t have to return
them with this syntax and there is a tooltip <variable> is declared but its value is never read. Vetur(6133)
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:6 (1 by maintainers)
Top Results From Across the Web
<script setup> | Vue.js
<script setup> is a compile-time syntactic sugar for using Composition API inside Single-File Components (SFCs). It is the recommended syntax if you are ......
Read more >Using script Setup for Vue 3 SFCs - DEV Community
What is <script setup> ? First, let's talk about how we normally implement Single Files components (SFCs) when using the Composition API. < ......
Read more >How to use the script setup syntax in Vue 3 | Ninja Squad
You enable it by adding a setup attribute to the script element of your SFC, and you can then remove a bit of...
Read more >Vue 3.2 - Using Composition API with Script Setup
The current recommended approach is: Use SFC + <script setup> + Composition API; Use VSCode + Volar (or WebStorm once its support for...
Read more >Vue 3 SFC <script setup> context argument - Stack Overflow
But how do you do this with the SFC syntax? So far these options have been deprecated or aren't found in the docs:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also get
Module '"mycomponent.vue"' has no default export.
see also https://github.com/vuejs/vetur/issues/2296