Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ const cliConfig = {
metafile: true,
};

const workerConfig = {
...baseConfig,
entryPoints: {
'worker/worker-entry': path.join(
path.dirname(require.resolve('ink')),
'worker/worker-entry.js',
),
},
outdir: 'bundle',
define: {
'process.env.NODE_ENV': JSON.stringify(
process.env.NODE_ENV || 'production',
),
},
Comment thread
rmedranollamas marked this conversation as resolved.
plugins: createWasmPlugins(),
alias: commonAliases,
};

const a2aServerConfig = {
...baseConfig,
banner: {
Expand All @@ -133,13 +151,18 @@ Promise.allSettled([
writeFileSync('./bundle/esbuild.json', JSON.stringify(metafile, null, 2));
}
}),
esbuild.build(workerConfig),
esbuild.build(a2aServerConfig),
]).then((results) => {
const [cliResult, a2aResult] = results;
const [cliResult, workerResult, a2aResult] = results;
if (cliResult.status === 'rejected') {
console.error('gemini.js build failed:', cliResult.reason);
process.exit(1);
}
if (workerResult.status === 'rejected') {
console.error('worker-entry.js build failed:', workerResult.reason);
process.exit(1);
}
// error in a2a-server bundling will not stop gemini.js bundling process
if (a2aResult.status === 'rejected') {
console.warn('a2a-server build failed:', a2aResult.reason);
Expand Down
Loading