Skip to content

Commit 594c782

Browse files
committed
chore: 增加树摇测试
1 parent e94039f commit 594c782

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"scripts": {
4141
"dev": "tsdown --watch",
4242
"build": "tsdown",
43+
"build:treeshake": "tsdown --config tests-treeshake/tsdown.config.ts",
4344
"play": "vite",
4445
"test": "vitest",
4546
"typecheck": "tsc --noEmit",

tests-treeshake/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ElPaginationAdapter } from '../dist'

tests-treeshake/tsdown.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { resolve } from 'node:path'
2+
import { defineConfig } from 'tsdown'
3+
4+
export default defineConfig([
5+
{
6+
entry: [resolve(import.meta.dirname, 'index.ts')],
7+
platform: 'neutral',
8+
dts: false,
9+
outDir: resolve(import.meta.dirname, 'dist'),
10+
},
11+
])

tsconfig.node.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"types": ["node"],
88
"noEmit": true
99
},
10-
"include": ["*.config.*"]
10+
"include": ["*.config.*", "tests-treeshake/*.config.*"]
1111
}

0 commit comments

Comments
 (0)