Skip to content

Commit 80ce60e

Browse files
committed
fix(config): support upgraded typescript builds
1 parent b355739 commit 80ce60e

7 files changed

Lines changed: 19 additions & 13 deletions

File tree

apps/vite-react/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"esModuleInterop": false,
1515
"forceConsistentCasingInFileNames": true,
1616
"isolatedModules": true,
17-
"skipLibCheck": true
17+
"skipLibCheck": true,
18+
"ignoreDeprecations": "6.0"
1819
},
1920
"references": [{ "path": "./tsconfig.node.json" }],
2021
"include": ["src"]

apps/vite-vanilla/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"noEmit": true,
1414
"esModuleInterop": true,
1515
"isolatedModules": true,
16-
"skipLibCheck": true
16+
"skipLibCheck": true,
17+
"ignoreDeprecations": "6.0"
1718
},
1819
"include": ["src"]
1920
}

packages/config/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
],
2626
"exports": {
2727
".": {
28-
"types": "./src/index.ts",
28+
"types": "./dist/index.d.ts",
2929
"import": "./src/index.ts",
3030
"require": "./src/index.ts"
3131
}
3232
},
3333
"main": "./src/index.ts",
3434
"module": "./src/index.ts",
35-
"types": "./src/index.ts",
35+
"types": "./dist/index.d.ts",
3636
"typesVersions": {
3737
"*": {
3838
"*": [
39-
"./src/*",
40-
"./src/index.ts"
39+
"./dist/*",
40+
"./dist/index.d.ts"
4141
]
4242
}
4343
},

packages/config/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { createDefineConfig, ResolvedConfig } from 'c12'
22
import type { TailwindcssMangleConfig } from './types'
33
import fs from 'fs-extra'
44
import path from 'pathe'
5-
import { CONFIG_NAME } from './constants'
6-
import { getDefaultUserConfig } from './defaults'
5+
import { CONFIG_NAME } from './constants.ts'
6+
import { getDefaultUserConfig } from './defaults.ts'
77

88
type DefineConfig = ReturnType<typeof createDefineConfig<TailwindcssMangleConfig>>
99

packages/config/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from './config'
2-
export * from './constants'
3-
export * from './defaults'
4-
export * from './types'
1+
export * from './config.ts'
2+
export * from './constants.ts'
3+
export * from './defaults.ts'
4+
export * from './types.ts'

packages/config/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"baseUrl": ".",
56
"paths": {
67
"@/*": [

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646
"esModuleInterop": true,
4747

4848
// 跳过库文件的类型检查,提高编译速度(库文件通常已经有类型声明)
49-
"skipLibCheck": true
49+
"skipLibCheck": true,
50+
51+
// TypeScript 6 deprecates baseUrl, but package tsconfigs still use it for local path aliases.
52+
"ignoreDeprecations": "6.0"
5053
},
5154
"exclude": [
5255
"**/node_modules/**",

0 commit comments

Comments
 (0)