Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 1127f68

Browse files
committed
docs: note about IDE support, close #6
1 parent ae19abe commit 1127f68

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,32 @@ const Vue2SFC = transform(`
8686
`)
8787
```
8888

89+
## IDE
90+
91+
We recommend using [VS Code](https://code.visualstudio.com/) with [Volar](https://github.com/johnsoncodehk/volar) to get the best experience (You might want to disable Vetur if you have it).
92+
93+
When using Volar, you will need to install `@vue/runtime-dom` as devDependencies to make it work on Vue 2.
94+
95+
```bash
96+
npm i -D @vue/runtime-dom
97+
```
98+
99+
[Learn more](https://github.com/johnsoncodehk/volar#using)
100+
101+
###### ESLint
102+
103+
If you are using ESLint, you might get `@typescript-eslint/no-unused-vars` warning with `<script setup>`. You can disable it and add `noUnusedLocals: true` in your `tsconfig.json`, Volar will infer the real missing locals correctly for you.
104+
89105
## Status
90106

91-
- [x] POC
107+
- [x] PoC
92108
- [x] Components registration
93109
- [x] Compile time macros `defineProps` `defineEmits` `withDefaults`
110+
- [x] Global types
94111
- [x] Merge with normal scripts
95112
- [x] Vite plugin
96113
- [x] Webpack plugin
97-
- [x] Global types
114+
- [x] Nuxt module
98115
- [ ] Top-level await
99116

100117
## How?

examples/nuxt/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@nuxt/types": "^2.15.8",
1717
"@nuxt/typescript-build": "^2.1.0",
1818
"@nuxtjs/composition-api": "^0.27.0",
19+
"@vue/runtime-dom": "^3.2.4",
1920
"vue2-script-setup-transform": "workspace:*"
2021
}
2122
}

examples/nuxt/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
],
1111
"esModuleInterop": true,
1212
"allowJs": true,
13+
"noUnusedLocals": true,
1314
"sourceMap": true,
1415
"strict": true,
1516
"noEmit": true,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"@types/jest": "^27.0.1",
5757
"@types/node": "^16.7.1",
5858
"@vue/composition-api": "^1.1.1",
59+
"@vue/runtime-dom": "^3.2.4",
5960
"bumpp": "^6.0.6",
6061
"eslint": "^7.32.0",
6162
"eslint-plugin-jest": "^24.4.0",

pnpm-lock.yaml

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)