-
Notifications
You must be signed in to change notification settings - Fork 296
Expand file tree
/
Copy pathrollup.config.js
More file actions
36 lines (35 loc) · 908 Bytes
/
rollup.config.js
File metadata and controls
36 lines (35 loc) · 908 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
31
32
33
34
35
36
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
export default {
input: 'index.js',
output: {
file: 'dist/index.js',
format: 'esm',
banner: '#!/usr/bin/env node',
inlineDynamicImports: true,
},
treeshake: false,
plugins: [
resolve({
preferBuiltins: true,
}),
commonjs(),
json(),
],
external: [
// Node.js built-ins
'fs', 'path', 'url', 'util', 'stream', 'events', 'buffer', 'crypto',
'child_process', 'os', 'http', 'https', 'net', 'tls', 'zlib',
// Native modules that shouldn't be bundled
'node-sqlite3-wasm',
// MCP SDK - keep external for proper ESM
'@modelcontextprotocol/sdk',
],
onwarn: function(warning, warn) {
if (['CIRCULAR_DEPENDENCY', 'EVAL'].includes(warning.code)) {
return;
}
warn(warning);
},
};