Skip to content

Commit 5ec1022

Browse files
ryanbas21claude
andcommitted
fix(treeshake-check): correct dist paths and clean up publish files
- Fix exports/main/types/bin to point to dist/index.js (not dist/src/) - Exclude tsbuildinfo and test-setup from published files - Exclude test-setup.ts from lib build - Reduces pack size from 59KB to 12.5KB Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bc4a8ab commit 5ec1022

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

packages/treeshake-check/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
"type": "module",
77
"exports": {
88
".": {
9-
"types": "./dist/src/index.d.ts",
10-
"import": "./dist/src/index.js",
11-
"default": "./dist/src/index.js"
9+
"types": "./dist/index.d.ts",
10+
"import": "./dist/index.js",
11+
"default": "./dist/index.js"
1212
},
1313
"./package.json": "./package.json"
1414
},
15-
"main": "./dist/src/index.js",
16-
"types": "./dist/src/index.d.ts",
15+
"main": "./dist/index.js",
16+
"types": "./dist/index.d.ts",
1717
"bin": {
18-
"treeshake-check": "./dist/src/index.js"
18+
"treeshake-check": "./dist/index.js"
1919
},
2020
"files": [
21-
"dist"
21+
"dist",
22+
"!dist/test-setup.*",
23+
"!dist/*.tsbuildinfo"
2224
],
2325
"scripts": {
2426
"build": "tsc -p tsconfig.lib.json",

packages/treeshake-check/tsconfig.lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"include": ["src/**/*.ts"],
2020
"references": [],
21-
"exclude": ["vitest.config.mts", "src/**/*.test.ts", "src/**/*.spec.ts"]
21+
"exclude": ["vitest.config.mts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/test-setup.ts"]
2222
}

0 commit comments

Comments
 (0)