20 lines
451 B
TypeScript
20 lines
451 B
TypeScript
import { defineConfig } from "tsup";
|
|
import { peerDependencies } from "./package.json";
|
|
|
|
export default defineConfig((options) => {
|
|
const dev = !!options.watch;
|
|
return {
|
|
entry: ["src/**/*.(ts|js)"],
|
|
format: ["esm"],
|
|
target: "node18",
|
|
bundle: true,
|
|
dts: true,
|
|
sourcemap: true,
|
|
clean: true,
|
|
splitting: false,
|
|
minify: !dev,
|
|
external: [...Object.keys(peerDependencies)],
|
|
tsconfig: "tsconfig.json",
|
|
};
|
|
});
|