fix: add cjs format support
This commit is contained in:
parent
3164da64d0
commit
f27ec9db5d
1 changed files with 1625 additions and 117 deletions
23
tsup.config.ts
Normal file
23
tsup.config.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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"],
|
||||
},
|
||||
]);
|
||||
Loading…
Reference in a new issue