-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
61 lines (58 loc) · 1.57 KB
/
tsdown.config.ts
File metadata and controls
61 lines (58 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const env = {
NODE_ENV: "production",
};
// Native .node packages must stay external; rolldown cannot bundle shared libraries.
const nativeExternals = [
"node-llama-cpp",
"@reflink/reflink",
"@reflink/reflink-darwin-arm64",
"@reflink/reflink-darwin-x64",
"@reflink/reflink-linux-arm64-gnu",
"@reflink/reflink-linux-x64-gnu",
"fsevents",
// Keep React external for Node server builds; bundling it introduces incompatible wrappers.
"react",
"react-dom",
];
// Runtime-loaded @elizaos/plugin-* packages must stay external.
const pluginExternal = /^@elizaos\/plugin-/;
const optionalAppExternal = /^@elizaos\/app-/;
const allExternals = [...nativeExternals, pluginExternal, optionalAppExternal];
export default [
{
entry: "eliza/packages/app-core/src/index.ts",
env,
fixedExtension: false,
platform: "node",
inlineOnly: false,
external: allExternals,
},
{
entry: "eliza/packages/app-core/src/entry.ts",
env,
fixedExtension: false,
platform: "node",
unbundle: true,
inlineOnly: false,
external: allExternals,
},
{
entry: "eliza/packages/app-core/src/runtime/eliza.ts",
env,
fixedExtension: false,
platform: "node",
inlineOnly: false,
external: allExternals,
outputOptions: { codeSplitting: false },
},
{
entry: "eliza/packages/app-core/src/api/server.ts",
env,
fixedExtension: false,
platform: "node",
inlineOnly: false,
external: allExternals,
// Disable code splitting to avoid circular imports in server.js.
outputOptions: { codeSplitting: false },
},
];