File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 47
47
48
48
``` ts
49
49
// vite.config.ts
50
- import VueJsxVapor from ' vue-jsx-vapor/vite'
50
+ import vueJsxVapor from ' vue-jsx-vapor/vite'
51
51
52
52
export default defineConfig ({
53
53
plugins: [
@@ -78,10 +78,28 @@ export default () => {
78
78
79
79
## Typescript
80
80
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.\
83
83
It works similarly to [ @vue/language-tools ] ( https://github.com/vuejs/language-tools ) but only used for ` ts ` or ` tsx ` files.
84
84
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
+
85
103
86
104
<details >
87
105
<summary >Vite</summary ><br >
You can’t perform that action at this time.
0 commit comments