Skip to content

Commit 42e546e

Browse files
committed
build: Update tsconfig
1 parent 125fa5f commit 42e546e

File tree

6 files changed

+27
-20
lines changed

6 files changed

+27
-20
lines changed

rollup.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default defineConfig([
3535
defaultIsModuleExports: 'auto',
3636
}),
3737
typescriptPlugin({
38-
tsconfig: './tsconfig.cjs.json',
38+
tsconfig: './tsconfig.lib-cjs.json',
3939
}),
4040
],
4141
},
@@ -58,7 +58,7 @@ export default defineConfig([
5858
}),
5959
commonjsPlugin(),
6060
typescriptPlugin({
61-
tsconfig: './tsconfig.esm.json',
61+
tsconfig: './tsconfig.lib-esm.json',
6262
}),
6363
],
6464
},

tsconfig.esm.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

tsconfig.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
{
22
"compilerOptions": {
3-
"target": "ESNext",
4-
"module": "ESNext",
5-
"moduleResolution": "node",
6-
"allowJs": true,
7-
"esModuleInterop": true,
3+
/* dirs */
4+
"rootDir": ".",
5+
"types": ["node"],
6+
/* module config */
7+
"target": "esnext",
8+
"lib": ["es2020", "es2022.error"],
9+
"module": "nodenext",
10+
"moduleResolution": "NodeNext",
811
"resolveJsonModule": true,
9-
"declaration": false,
12+
"esModuleInterop": true,
13+
/* behaviour options */
14+
"allowJs": true,
1015
"noEmit": true,
1116
"skipLibCheck": true,
12-
"types": ["node"],
13-
"lib": ["es2020", "es2022.error"]
17+
"strict": true
1418
},
1519
"ts-node": {
1620
"compilerOptions": {
1721
"module": "CommonJS"
1822
}
19-
}
23+
},
24+
"exclude": ["node_modules", "lib", "dist"]
2025
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.base.json",
2+
"extends": "./tsconfig.lib.json",
33
"compilerOptions": {
44
"outDir": "./lib/cjs"
55
}

tsconfig.lib-esm.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.lib.json",
3+
"compilerOptions": {
4+
"outDir": "./lib/esm",
5+
"declarationDir": "./lib/types",
6+
"declaration": true
7+
}
8+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"compilerOptions": {
44
/* dirs */
55
"rootDir": "./src",
6-
"declarationDir": "./lib/types",
76
"types": ["node"],
87
/* module config */
98
"target": "es2020",
109
"lib": ["es2020", "es2022.error"],
10+
"module": "ESNext",
11+
"moduleResolution": "bundler",
1112
"resolveJsonModule": true,
1213
"esModuleInterop": true,
1314
/* behaviour options */
1415
"strict": true,
1516
"allowJs": true,
1617
"allowSyntheticDefaultImports": true,
1718
"noFallthroughCasesInSwitch": true,
18-
"declaration": true,
1919
"sourceMap": true,
2020
"noImplicitReturns": true,
2121
"noImplicitOverride": true,

0 commit comments

Comments
 (0)