-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
24 lines (23 loc) · 877 Bytes
/
Copy pathtsup.config.ts
File metadata and controls
24 lines (23 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { defineConfig } from "tsup";
export default defineConfig({
entry: ["src/index.ts"],
format: ["esm", "cjs"],
dts: true,
sourcemap: true,
clean: true,
target: "es2022",
/*
Neutral, not node: this package has no node builtins of its own, and
everything that touches the filesystem lives in @diffbot/typescript's
separate /node entry, which we never import. Keeping this build target
platform-neutral means an accidental node builtin import here fails the
build instead of silently reintroducing a Workers incompatibility.
*/
platform: "neutral",
/*
@langchain/core is a peer dependency and must never be bundled — a second
copy in the output would break `instanceof` checks against the consumer's
own core instance (Document, BaseMessage, …).
*/
external: ["@langchain/core", "@diffbot/typescript", "zod"],
});