Skip to content

Commit

Permalink
feat: vue tsconfig update (#11052)
Browse files Browse the repository at this point in the history
  • Loading branch information
xierenyuan committed Apr 27, 2023
1 parent 2df127d commit 972606b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions packages/create-umi/templates/vue-app/tsconfig.json.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "./src/.umi/tsconfig.json",
"compilerOptions": {
"jsx": "preserve"
}
"extends": "./src/.umi/tsconfig.json"
}
6 changes: 2 additions & 4 deletions packages/preset-umi/src/features/tmpFiles/tmpFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ export default (api: IApi) => {
// TODO Actually, it should be vite mode, but here it is written as vue only
// Required in Vite https://vitejs.dev/guide/features.html#typescript
isolatedModules: true,
// For `<script setup>`
// See <https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#preserve-value-imports>
preserveValueImports: true,
}
: {}),

Expand All @@ -103,7 +100,8 @@ export default (api: IApi) => {
`${baseUrl}**/*.d.ts`,
`${baseUrl}**/*.ts`,
`${baseUrl}**/*.tsx`,
],
api.appData.framework === 'vue' && `${baseUrl}**/*.vue`,
].filter(Boolean),
},
null,
2,
Expand Down

0 comments on commit 972606b

Please sign in to comment.