typescript-sdk/tsup.config.ts
2024-12-31 16:19:20 +08:00

23 lines
399 B
TypeScript

import { defineConfig, Options } from "tsup";
const commonConfig: Options = {
clean: true,
dts: true,
splitting: false,
tsconfig: "tsconfig.prod.json",
};
export default defineConfig([
{
...commonConfig,
entry: ["src/**/*"],
outDir: "dist/cjs",
format: ["cjs"],
},
{
...commonConfig,
entry: ["src/**/*"],
outDir: "dist/esm",
format: ["esm"],
},
]);