Skip to content

Commit 64b0920

Browse files
authored
chore: migrate build tooling from tsup to tsdown (#1089)
1 parent 3d04a74 commit 64b0920

4 files changed

Lines changed: 471 additions & 536 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"format": "biome format . && prettier --check \"**/*.{md,yml,yaml}\"",
1919
"format:fix": "biome format --write . && prettier --write \"**/*.{md,yml,yaml}\"",
2020
"clean": "rimraf dist",
21-
"build": "yarn clean && tsc && tsup",
21+
"build": "yarn clean && tsc && tsdown",
2222
"build-bundles": "bun run scripts/build-cli-bundles.ts",
2323
"prepack": "yarn insert-cli-metadata && yarn build && yarn update-docs",
2424
"insert-cli-metadata": "tsx scripts/insert-cli-metadata.ts",
@@ -142,7 +142,7 @@
142142
"lint-staged": "^16.0.0",
143143
"mock-stdin": "^1.0.0",
144144
"prettier": "^3.5.3",
145-
"tsup": "^8.5.0",
145+
"tsdown": "^0.21.9",
146146
"tsx": "^4.16.5",
147147
"typescript": "^6.0.0",
148148
"typescript-eslint": "^8.31.0",

tsconfig.eslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"features/**/*.js",
1515
".github/scripts",
1616
"eslint.config.mjs",
17-
"tsup.config.ts",
17+
"tsdown.config.ts",
1818
"website/sidebars.js",
1919
"website/src/**/*.js",
2020
"website/src/**/*.ts"
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
// eslint-disable-next-line import/no-extraneous-dependencies
2-
import { defineConfig } from 'tsup';
2+
import { defineConfig } from 'tsdown';
33

44
export default [
55
defineConfig({
66
entry: ['src/entrypoints/apify.ts', 'src/entrypoints/actor.ts'],
7-
external: [],
8-
noExternal: [],
97
platform: 'node',
108
format: ['esm'],
119
target: 'es2022',
12-
skipNodeModulesBundle: true,
10+
deps: {
11+
skipNodeModulesBundle: true,
12+
},
1313
clean: true,
14-
minify: true,
15-
terserOptions: {
16-
mangle: false,
17-
keep_classnames: true,
18-
keep_fnames: true,
14+
minify: {
15+
compress: {
16+
keepNames: { function: true, class: true },
17+
},
18+
mangle: {
19+
keepNames: true,
20+
},
1921
},
20-
splitting: true,
21-
keepNames: true,
2222
dts: false,
2323
sourcemap: true,
24-
bundle: true,
2524
treeshake: false,
2625
outDir: 'dist',
26+
outExtensions: () => ({ js: '.js' }),
2727
}),
2828
defineConfig({
2929
entry: ['src/index.ts'],
@@ -33,5 +33,6 @@ export default [
3333
sourcemap: false,
3434
dts: false,
3535
outDir: 'dist',
36+
outExtensions: () => ({ js: '.js' }),
3637
}),
3738
];

0 commit comments

Comments
 (0)