Vue SFC support
See original GitHub issueSupport for Vue SFC (Single File Components).
A Vue SFC is a file like the following:
<template>
<div class="d-flex">Hello</div>
</template>
<script>
export default {}
</script>
<style>
.d-flex {
display: flex;
}
</style>
As we can see, there’s a tag called style
that can contain css and other pre-processors, such as scss.
The style
tag accepts css
code by default, or the extension specified by the lang
attribute. Example:
<style lang="scss">
/* ... */
</style>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Tooling - Vue.js
Vite is a lightweight and fast build tool with first-class Vue SFC support. It is created by Evan You, who is also the...
Read more >Single-File Components - Vue.js
IDE support with auto-completion and type-checking for template expressions; Out-of-the-box Hot-Module Replacement (HMR) support. SFC is a defining feature of ...
Read more >SFC Syntax Specification - Vue.js
A Vue SFC is syntactically compatible with HTML. Each *.vue file consists of three types of top-level language blocks: <template> , <script> ...
Read more >Vue Single-File Component (SFC) Spec - Vue Loader
vue -loader supports using non-default languages, such as CSS pre-processors and compile-to-HTML template languages, by specifying the lang attribute for a ...
Read more ><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 >
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 Free
Top 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
@MegaMattMiller - I have opened a PR that adds support for HTML/Vue/Svelte. Would you mind pulling the PR down and testing it to make sure it works? I am not a Vue developer, so I am not sure of all the patterns that are used aside from what I saw in the documentation.
PR: #21
If you are able to try it out, please let me know if you have any questions or find any issues.
Here was the file I used for testing
This would be nice to have and should be fairly easy to do. If anybody wants to give it a shot, ping below and I’m more than happy to help.