-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtsup.config.ts
39 lines (38 loc) · 1.16 KB
/
tsup.config.ts
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
import { defineConfig } from "tsup";
import * as fs from 'fs'
export default defineConfig({
entry: ["src/index.ts"],
outDir: "dist",
sourcemap: true,
clean: true,
esbuildPlugins: [
{
name: 'sol-loader',
setup(build) {
build.onLoad({ filter: /\.sol$/ }, async (args) => {
const content = await fs.promises.readFile(args.path, 'utf8')
return {
contents: `export default ${JSON.stringify(content)}`,
loader: 'js'
}
})
}
}
],
format: ["esm"], // Ensure you're targeting CommonJS
external: [
"dotenv", // Externalize dotenv to prevent bundling
"fs", // Externalize fs to use Node.js built-in module
"path", // Externalize other built-ins if necessary
"@reflink/reflink",
"@node-llama-cpp",
"https",
"http",
"agentkeepalive",
"safe-buffer",
"viem",
"@elizaos/core",
"@elizaos-plugins/plugin-image-generation",
// Add other modules you want to externalize
],
});