Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: vue tsconfig update #11052

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v3.4 就不默认污染全局 jsx 命名空间了,对 v 不是很熟,这块变更有对策吗?

https://github.com/vuejs/core/blob/main/CHANGELOG.md#note-on-jsx-types-change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我关注吧 等升级后我跟进

}
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