-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtsup.config.ts
More file actions
30 lines (27 loc) · 799 Bytes
/
tsup.config.ts
File metadata and controls
30 lines (27 loc) · 799 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
25
26
27
28
29
30
import { defineConfig } from 'tsup';
import { readFileSync } from 'fs';
import { resolve } from 'path';
// Read version from package.json at build time
const packageJson = JSON.parse(readFileSync(resolve(__dirname, './package.json'), 'utf8'));
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
dts: true,
sourcemap: true,
clean: true,
outDir: 'dist',
target: 'es2020',
minify: true,
treeshake: true,
splitting: true,
esbuildOptions(options) {
// Add banner
options.banner = {
js: '// Firecrawl Simple MCP Server - https://github.com/firecrawl/firecrawl-simple-mcp',
};
// Define version constant at build time
options.define = {
'process.env.PACKAGE_VERSION': JSON.stringify(packageJson.version),
};
},
});