Skip to content

Commit 8da2b5e

Browse files
committed
feat(tsconfig): rework tsconfig setup
1 parent 19dfc26 commit 8da2b5e

File tree

4 files changed

+25
-29
lines changed

4 files changed

+25
-29
lines changed

tsconfig.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
{
2+
"compilerOptions": {
3+
"target": "esNext",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"baseUrl": "lib",
6+
"rootDir": "lib",
7+
"module": "esnext",
8+
"moduleResolution": "node",
9+
"paths": {
10+
"~/*": ["./*"]
11+
},
12+
"resolveJsonModule": true,
13+
"strict": true,
14+
"declaration": true,
15+
"noEmit": true,
16+
"outDir": "dist",
17+
"sourceMap": true,
18+
"allowSyntheticDefaultImports": true,
19+
"esModuleInterop": true,
20+
"skipLibCheck": true
21+
},
222
"references": [
3-
{ "path": "./tsconfig.lib.json" },
423
{ "path": "./tsconfig.test.json" }
5-
]
24+
],
25+
"include": ["lib", "**/*.ts"],
26+
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "dist", "node_modules"]
627
}

tsconfig.lib.json

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

tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.lib.json",
2+
"extends": "./tsconfig.json",
33
"include": ["**/*.ts", "**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
44
"exclude": ["dist", "node_modules"]
55
}

tsup.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { defineConfig } from 'tsup';
22

33
export default defineConfig({
4-
entry: ['lib', '!lib/**/*.test.ts', '!lib/**/*.spec.ts'],
4+
entry: ['lib', '!lib/**/*.test.ts', '!lib/**/*.spec.ts', '!lib/mocks'],
55
format: ['cjs', 'esm'],
66
dts: true,
77
clean: true,
88
splitting: true,
99
sourcemap: false,
10-
tsconfig: 'tsconfig.lib.json',
1110
});

0 commit comments

Comments
 (0)