Skip to content

Commit 8d61a07

Browse files
committed
fix: exclude test files from build
1 parent 3a4e78f commit 8d61a07

File tree

6 files changed

+14
-3
lines changed

6 files changed

+14
-3
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4+
"noEmit": false,
45
"composite": true,
56
"module": "commonjs",
67
"moduleResolution": "node10",
78
"rootDir": "src",
89
"outDir": "lib/cjs"
910
},
10-
"include": ["src"]
11+
"include": ["src"],
12+
"exclude": ["**/__tests__/*", "**/*.test.ts"]
1113
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4+
"noEmit": false,
45
"composite": true,
56
"rootDir": "src",
67
"outDir": "lib/esm"
78
},
8-
"include": ["src"]
9+
"include": ["src"],
10+
"exclude": ["**/__tests__/*", "**/*.test.ts"]
911
}

packages/demo-package-tsc/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{
99
"path": "tsconfig.build.esm.json"
1010
},
11-
{ "path": "tsconfig.build.cjs.json" }
11+
{ "path": "tsconfig.build.cjs.json" },
12+
{ "path": "tsconfig.typecheck.json" }
1213
]
1314
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "@tasshi-playground/tsconfig",
3+
"include": ["**/*"]
4+
}

packages/demo-package-vite-2/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default defineConfig({
3333
},
3434
plugins: [
3535
dts({
36+
exclude: ["**/__tests__/*", "**/*.test.ts"],
3637
// modify type files after they have been written
3738
// ref. https://github.com/qmhc/vite-plugin-dts/issues/267#issuecomment-2142950802
3839
afterBuild: async () => {

packages/demo-package-vite/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default defineConfig({
3434
plugins: [
3535
dts({
3636
outDir: [`${outDir}/es`, `${outDir}/cjs`],
37+
exclude: ["**/__tests__/*", "**/*.test.ts"],
3738
}),
3839
viteStaticCopy({
3940
targets: [

0 commit comments

Comments
 (0)