mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 03:30:40 +00:00
fix(deps): externalize tree-sitter (#840)
Submitting without approval to fix broken deployment on main. But also, we should lock this down.
This commit is contained in:
parent
d0b78225a1
commit
584286cfd9
6 changed files with 59 additions and 20 deletions
29
esbuild.config.js
Normal file
29
esbuild.config.js
Normal file
|
|
@ -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));
|
||||
Loading…
Add table
Add a link
Reference in a new issue