plugin-message-meme/tsdown.config.ts
2025-11-26 15:32:08 +00:00

29 lines
537 B
TypeScript

import { defineConfig, type UserConfig } from "tsdown";
const baseOptions: UserConfig = {
clean: true,
entry: ["src/**/*.ts"],
dts: true,
minify: false,
skipNodeModulesBundle: true,
sourcemap: true,
target: "es2021",
tsconfig: "tsconfig.json",
keepNames: true,
treeshake: true,
};
export default [
defineConfig({
...baseOptions,
outDir: "dist/cjs",
format: "cjs",
outExtension: () => ({ js: ".cjs" }),
}),
defineConfig({
...baseOptions,
outDir: "dist/esm",
format: "esm",
}),
];