fix: fix tsconfig for not Vue projects (#1342)

This commit is contained in:
Xie Jay 2024-01-27 09:50:27 +08:00 committed by GitHub
parent 83807b61d1
commit 582ce09db2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 100 additions and 11 deletions

View File

@ -1,3 +1,3 @@
{
"extends": "./tsconfig.vue3.json"
}
"references": [{ "path": "./tsconfig.react.json" }, { "path": "./tsconfig.vue3.json" }]
}

32
tsconfig.react.json Normal file
View File

@ -0,0 +1,32 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"composite": true,
"allowJs": true,
"noImplicitAny": false,
"baseUrl": ".",
"jsx": "react-jsx",
"jsxImportSource": "react",
"paths": {
"@opentiny/react-*": ["packages/react-*", "packages/react/src/*"],
"@opentiny/vue-renderless/types*": ["packages/renderless/types*"],
"@opentiny/vue-renderless*": ["packages/renderless/src*"],
"virtual:common/adapter/react": ["packages/react-common/src/adapter/react/index.ts"],
"virtual:locale/react": ["packages/react-locale/src/react/index.ts"]
},
"types": ["node", "vite/client"]
},
"include": [
"packages/react/**/*.ts",
"packages/react/**/*.tsx",
"packages/react-common/**/*.ts",
"packages/react-common/**/*.tsx",
"packages/react-icon/**/*.ts",
"packages/react-icon/**/*.tsx",
"packages/react-locale/**/*.ts",
"packages/react-locale/**/*.tsx",
"examples/react/shims-app.d.ts",
"examples/react/shims-react.d.ts"
],
"exclude": ["**/node_modules", "**/dist*", "**/*.md"]
}

View File

@ -1,6 +1,7 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"composite": true,
"allowJs": true,
"noImplicitAny": false,
"baseUrl": ".",
@ -20,9 +21,27 @@
"target": 2.7
},
"include": [
"packages/**/*.ts",
"packages/**/*.tsx",
"packages/**/*.vue",
"packages/design/**/*.ts",
"packages/design/**/*.tsx",
"packages/design/**/*.vue",
"packages/renderless/**/*.ts",
"packages/renderless/**/*.tsx",
"packages/renderless/**/*.vue",
"packages/vue/**/*.ts",
"packages/vue/**/*.tsx",
"packages/vue/**/*.vue",
"packages/vue-common/**/*.ts",
"packages/vue-common/**/*.tsx",
"packages/vue-common/**/*.vue",
"packages/vue-icon/**/*.ts",
"packages/vue-icon/**/*.tsx",
"packages/vue-icon/**/*.vue",
"packages/vue-icon-saas/**/*.ts",
"packages/vue-icon-saas/**/*.tsx",
"packages/vue-icon-saas/**/*.vue",
"packages/vue-locale/**/*.ts",
"packages/vue-locale/**/*.tsx",
"packages/vue-locale/**/*.vue",
"examples/vue2.7/shims-app.d.ts",
"examples/vue2.7/shims-vue.d.ts"
],

View File

@ -1,6 +1,7 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"composite": true,
"allowJs": true,
"noImplicitAny": false,
"baseUrl": ".",
@ -20,9 +21,27 @@
"target": 2
},
"include": [
"packages/**/*.ts",
"packages/**/*.tsx",
"packages/**/*.vue",
"packages/design/**/*.ts",
"packages/design/**/*.tsx",
"packages/design/**/*.vue",
"packages/renderless/**/*.ts",
"packages/renderless/**/*.tsx",
"packages/renderless/**/*.vue",
"packages/vue/**/*.ts",
"packages/vue/**/*.tsx",
"packages/vue/**/*.vue",
"packages/vue-common/**/*.ts",
"packages/vue-common/**/*.tsx",
"packages/vue-common/**/*.vue",
"packages/vue-icon/**/*.ts",
"packages/vue-icon/**/*.tsx",
"packages/vue-icon/**/*.vue",
"packages/vue-icon-saas/**/*.ts",
"packages/vue-icon-saas/**/*.tsx",
"packages/vue-icon-saas/**/*.vue",
"packages/vue-locale/**/*.ts",
"packages/vue-locale/**/*.tsx",
"packages/vue-locale/**/*.vue",
"examples/vue2/shims-app.d.ts",
"examples/vue2/shims-vue.d.ts"
],

View File

@ -1,6 +1,7 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"composite": true,
"allowJs": true,
"noImplicitAny": false,
"baseUrl": ".",
@ -20,9 +21,27 @@
"target": 3
},
"include": [
"packages/**/*.ts",
"packages/**/*.tsx",
"packages/**/*.vue",
"packages/design/**/*.ts",
"packages/design/**/*.tsx",
"packages/design/**/*.vue",
"packages/renderless/**/*.ts",
"packages/renderless/**/*.tsx",
"packages/renderless/**/*.vue",
"packages/vue/**/*.ts",
"packages/vue/**/*.tsx",
"packages/vue/**/*.vue",
"packages/vue-common/**/*.ts",
"packages/vue-common/**/*.tsx",
"packages/vue-common/**/*.vue",
"packages/vue-icon/**/*.ts",
"packages/vue-icon/**/*.tsx",
"packages/vue-icon/**/*.vue",
"packages/vue-icon-saas/**/*.ts",
"packages/vue-icon-saas/**/*.tsx",
"packages/vue-icon-saas/**/*.vue",
"packages/vue-locale/**/*.ts",
"packages/vue-locale/**/*.tsx",
"packages/vue-locale/**/*.vue",
"examples/vue3/shims-app.d.ts",
"examples/vue3/shims-vue.d.ts"
],