Skip to content

Commit 23fd357

Browse files
committed
add tsup config
1 parent 24042d7 commit 23fd357

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/inference/tsup.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { Options } from "tsup";
2+
3+
const baseConfig: Options = {
4+
entry: ["./index.ts"],
5+
format: ["cjs", "esm"],
6+
outDir: "dist",
7+
clean: true,
8+
};
9+
10+
const nodeConfig: Options = {
11+
...baseConfig,
12+
platform: "node",
13+
};
14+
15+
const browserConfig: Options = {
16+
...baseConfig,
17+
platform: "browser",
18+
splitting: true,
19+
outDir: "dist/browser",
20+
};
21+
22+
export default [nodeConfig, browserConfig];

0 commit comments

Comments
 (0)