12345678910111213141516171819202122232425262728293031323334 |
- import { defineConfig } from "tsup";
- export default defineConfig((options) => [
- {
- entry: ["src/index.ts", "src/preset.ts"],
- splitting: false,
- minify: !options.watch,
- format: ["cjs", "esm"],
- dts: {
- resolve: true,
- },
- treeshake: true,
- sourcemap: true,
- clean: true,
- platform: "browser",
- esbuildOptions(options) {
- options.conditions = ["module"];
- },
- },
- {
- entry: ["src/postinstall.ts"],
- outDir: "./bin",
- splitting: false,
- minify: !options.watch,
- format: ["cjs"],
- treeshake: true,
- target: "node16",
- clean: true,
- platform: "node",
- esbuildOptions(options) {
- options.conditions = ["module"];
- },
- },
- ]);
|