diff options
| author | matt korwel <[email protected]> | 2025-06-08 02:05:55 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-08 02:05:55 -0700 |
| commit | 584286cfd9b53eee8f1189a3ad98462c77eb8fb9 (patch) | |
| tree | 7c55df6bd6fbc60c3264f2a58ee531b3517f639e /esbuild.config.js | |
| parent | d0b78225a1dc559ed325f2bc0040a50430fe9838 (diff) | |
fix(deps): externalize tree-sitter (#840)
Submitting without approval to fix broken deployment on main. But also, we should lock this down.
Diffstat (limited to 'esbuild.config.js')
| -rw-r--r-- | esbuild.config.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/esbuild.config.js b/esbuild.config.js new file mode 100644 index 00000000..7dae9e37 --- /dev/null +++ b/esbuild.config.js @@ -0,0 +1,29 @@ +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import esbuild from 'esbuild'; + +esbuild + .build({ + entryPoints: ['packages/cli/index.ts'], + bundle: true, + outfile: 'bundle/gemini.js', + platform: 'node', + format: 'esm', + banner: { + js: `import { createRequire } from 'module'; const require = createRequire(import.meta.url); globalThis.__filename = require('url').fileURLToPath(import.meta.url); globalThis.__dirname = require('path').dirname(globalThis.__filename);`, + }, + external: [ + 'tree-sitter', + 'tree-sitter-c-sharp', + 'tree-sitter-go', + 'tree-sitter-java', + 'tree-sitter-python', + 'tree-sitter-rust', + 'tree-sitter-typescript', + ], + }) + .catch(() => process.exit(1)); |
