Skip to content

Commit 0617563

Browse files
committed
feat(init/tsconfig): add macros-global type
1 parent 14e490e commit 0617563

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/init/tsconfig.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,10 @@ export async function rewriteTsConfig(selectedMacros: VueMacros, target: string)
4545
plugins.push(`@vue-macros/volar/${macro}`)
4646
}
4747

48+
tsconfig.compilerOptions ??= {}
49+
tsconfig.compilerOptions.types ??= []
50+
if (!tsconfig.compilerOptions.types.includes('unplugin-vue-macros/macros-global'))
51+
tsconfig.compilerOptions.types.push('unplugin-vue-macros/macros-global')
52+
4853
await writeTSConfig(`${target}/tsconfig.json`, tsconfig)
4954
}

0 commit comments

Comments
 (0)