chore(repo): migrate from tsup to tsdown

This commit is contained in:
2026-09-28 02:05:40 +01:00
parent e88af4aa01
commit b39a1d6e1b
4 changed files with 97 additions and 247 deletions
+13 -5
View File
@@ -31,17 +31,25 @@
"readme.md",
"license.md"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup",
"build": "tsdown",
"prepublishOnly": "bun run build",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@entityseven/fivem-rpc-shared-types": "workspace:*",
"@microsoft/api-extractor": "^7.47.9",
"tsup": "^8.3.0"
"tsdown": "^0.23.0"
},
"peerDependencies": {
"@entityseven/fivem-rpc-shared-types": "^1.0.0",
+11
View File
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
platform: 'neutral',
target: 'es2022',
fixedExtension: true,
dts: true,
exports: true,
})
-14
View File
@@ -1,14 +0,0 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
outDir: './dist',
target: 'node16',
platform: 'node',
format: ['cjs'],
splitting: false,
sourcemap: false,
clean: false,
experimentalDts: true,
noExternal: [/.*/],
})