Skip to content

Commit 646a93d

Browse files
committed
chore: update readme
1 parent 886a4e8 commit 646a93d

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Setup
4747

4848
```ts
4949
// vite.config.ts
50-
import VueJsxVapor from 'vue-jsx-vapor/vite'
50+
import vueJsxVapor from 'vue-jsx-vapor/vite'
5151

5252
export default defineConfig({
5353
plugins: [
@@ -78,10 +78,28 @@ export default () => {
7878

7979
## Typescript
8080

81-
Because of vue-jsx-vapor support all directives and most macros of Vue,
82-
so we need the VSCode plugin [ts-macro](https://github.com/ts-macro/ts-macro) to use the `vue-jsx-vapor/volar` plugin for Typescript support.
81+
Because of vue-jsx-vapor support all directives and most macros of Vue,\
82+
so we need the VSCode plugin [ts-macro](https://github.com/ts-macro/ts-macro) to use the `vue-jsx-vapor/volar` plugin for Typescript support.\
8383
It works similarly to [@vue/language-tools](https://github.com/vuejs/language-tools) but only used for `ts` or `tsx` files.
8484

85+
By default, after installing the `ts-macro` VSCode plugin,\
86+
`ts-macro` will automatically load `vue-jsx-vapor/volar` by analyzing `vite.config.ts` and shared vueJsxVapor's options,\
87+
so you don't need to config `tsm.config.ts`. But if you want, you can also configure it manually:
88+
89+
```ts
90+
// tsm.config.ts
91+
import vueJsxVapor from 'vue-jsx-vapor/volar'
92+
93+
export default {
94+
plugins: [
95+
vueJsxVapor({
96+
macros: true
97+
})
98+
],
99+
}
100+
101+
```
102+
85103

86104
<details>
87105
<summary>Vite</summary><br>

0 commit comments

Comments
 (0)