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 4747
4848``` ts
4949// vite.config.ts
50- import VueJsxVapor from ' vue-jsx-vapor/vite'
50+ import vueJsxVapor from ' vue-jsx-vapor/vite'
5151
5252export 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.\
8383It 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 >
You can’t perform that action at this time.
0 commit comments