Replace tsup with tsdown
This commit is contained in:
19
tsdown.config.ts
Normal file
19
tsdown.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from "tsdown";
|
||||
import packageJson from "./package.json" with { type: "json" };
|
||||
|
||||
export default defineConfig((options) => {
|
||||
const dev = !!options.watch;
|
||||
return {
|
||||
entry: ["src/**/*.(ts|js)"],
|
||||
format: ["esm"],
|
||||
target: "node24",
|
||||
unbundle: true,
|
||||
dts: true,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
splitting: false,
|
||||
minify: !dev,
|
||||
external: [...Object.keys(packageJson.peerDependencies), "dotenv"],
|
||||
tsconfig: "tsconfig.json",
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user