Skip to content
Open
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions tasksync-chat/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,26 @@ async function main() {
resolveExtensions: [".ts", ".js", ".mjs"],
});

// Build standalone MCP server (separate entry point, no vscode dependency)
const mcpCtx = await esbuild.context({
entryPoints: ["src/mcp/mcpServer.ts"],
bundle: true,
outfile: "dist/mcp-server.js",
external: [],
format: "cjs",
platform: "node",
target: "node18",
sourcemap: true,
minify: !watch,
banner: { js: "#!/usr/bin/env node" },
mainFields: ["module", "main"],
conditions: ["import", "node"],
resolveExtensions: [".ts", ".js", ".mjs"],
});

if (watch) {
await ctx.watch();
await mcpCtx.watch();
console.log("Watching extension for changes...");

// Also watch webview source files for changes
Expand Down Expand Up @@ -296,6 +314,8 @@ async function main() {
} else {
await ctx.rebuild();
await ctx.dispose();
await mcpCtx.rebuild();
await mcpCtx.dispose();
console.log("Build complete");
}
}
Expand Down
Loading
Loading