Skip to content

Commit bec2d0c

Browse files
committed
chore: build with tsdown
1 parent fb7a12f commit bec2d0c

5 files changed

Lines changed: 375 additions & 1253 deletions

File tree

package.json

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,26 @@
1212
"module": "dist/index.mjs",
1313
"types": "dist/types/index.d.ts",
1414
"sideEffects": false,
15+
"exports": {
16+
".": {
17+
"types": "./dist/types/index.d.ts",
18+
"import": "./dist/index.mjs",
19+
"require": "./dist/index.js"
20+
}
21+
},
1522
"engines": {
1623
"node": "20 || 22 || 24"
1724
},
1825
"workspaces": [
1926
"examples/*"
2027
],
28+
"peerDependencies": {
29+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
30+
},
31+
"dependencies": {
32+
"@junipero/core": "3.12.3",
33+
"@types/poool-access": "5.18.1"
34+
},
2135
"devDependencies": {
2236
"@poool/eslint-config": "5.0.7",
2337
"@poool/eslint-config-react": "5.0.9",
@@ -45,20 +59,17 @@
4559
"react-router-dom": "7.9.4",
4660
"swc-loader": "0.2.6",
4761
"ts-node": "10.9.2",
48-
"tsup": "8.5.0",
62+
"tsdown": "0.15.9",
4963
"typescript": "5.9.3",
5064
"typescript-eslint": "8.46.2",
5165
"webpack": "5.102.1",
5266
"webpack-cli": "6.0.1",
5367
"webpack-dev-server": "5.2.2"
5468
},
55-
"peerDependencies": {
56-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
57-
},
5869
"scripts": {
5970
"clean": "rm -rf ./dist || true",
6071
"build": "yarn clean && yarn build:code && yarn build:types",
61-
"build:code": "tsup",
72+
"build:code": "tsdown",
6273
"build:types": "tsc --project ./tsconfig.build.json",
6374
"prepack": "yarn build && yarn lint && yarn tsc && yarn test",
6475
"test": "NODE_ENV='test' jest",
@@ -68,12 +79,16 @@
6879
"example:basic": "yarn workspace poool-react-access-basic-example serve",
6980
"example:next": "yarn workspace poool-react-access-next-example dev"
7081
},
71-
"dependencies": {
72-
"@junipero/core": "3.12.3",
73-
"@types/poool-access": "5.18.1"
74-
},
7582
"resolutions": {
7683
"ws": "8.12.0"
7784
},
85+
"targets": [
86+
"chrome109",
87+
"edge138",
88+
"firefox140",
89+
"safari18",
90+
"opera80",
91+
"node20"
92+
],
7893
"packageManager": "yarn@4.10.3"
7994
}

tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"tests",
1313
"**/*.test.ts",
1414
"**/*.test.tsx",
15-
"tsup.config.ts",
15+
"tsdown.config.ts",
1616
"jest.config.ts",
1717
]
1818
}

tsdown.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineConfig } from 'tsdown';
2+
3+
import pkg from './package.json' with { type: 'json' };
4+
5+
export default defineConfig([
6+
{
7+
entry: ['./src/index.ts'],
8+
outDir: 'dist',
9+
target: pkg.targets,
10+
format: ['cjs', 'esm'],
11+
external: ['react', 'react-dom'],
12+
sourcemap: true,
13+
dts: false,
14+
},
15+
]);

tsup.config.ts

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

0 commit comments

Comments
 (0)