Skip to content

ci: bundle VS Code extension with esbuild - #123

Draft
diofeher wants to merge 2 commits into
mainfrom
feat/bundle-vscode-extension
Draft

ci: bundle VS Code extension with esbuild#123
diofeher wants to merge 2 commits into
mainfrom
feat/bundle-vscode-extension

Conversation

@diofeher

Copy link
Copy Markdown
Contributor

Summary

  • Bundles the VS Code extension with esbuild so the published VSIX ships a single out/extension.js instead of the entire node_modules tree
  • File count in the VSIX drops from 390 files (255 JS) to 8 files
  • Resolves the vsce bundling warning surfaced in run #24476768226

Changes

  • Add esbuild as a devDependency and a small esbuild.js build script
  • Add bundle / bundle:watch npm scripts; vscode:prepublish now runs bundle (esbuild) instead of compile (tsc) so the published artifact is the bundled file
  • Tighten .vscodeignore to exclude node_modules, src, scripts, docs, testFixture, build artifacts, and editor/local config that previously leaked into the VSIX

The tsc-based compile / watch scripts are kept as-is for local F5 debugging — launch.json still invokes the watch task, so the dev loop is unchanged.

Test plan

  • npm run bundle produces out/extension.js (~347 KB, minified, vscode marked external)
  • tsc -b still type-checks clean
  • vsce ls reports 8 files packaged (down from 390)
  • Release workflow packages all 6 targets and the VSIX activates correctly in VS Code

Bundles the extension into a single out/extension.js at publish time so
the VSIX ships only the files needed at runtime.

Previously the packaged extension included node_modules and every
compiled TypeScript file — 390 files, 255 of which were JS — which
vsce warned about for performance. After bundling the VSIX now
contains 8 files: the bundled extension.js, the Go language server
binary, and the static assets (package.json, grammar, icon, etc.).

- Add esbuild as a devDependency and an esbuild.js build script
- Add bundle and bundle:watch npm scripts; vscode:prepublish now runs
  bundle instead of tsc so the published artifact is the bundled file
- Tighten .vscodeignore to exclude node_modules, src, scripts, docs,
  testFixture, build artifacts, and editor/local config that leaked
  into the VSIX

The tsc-based compile and watch scripts are kept as-is for local F5
debugging (launch.json still invokes the watch task).
@diofeher
diofeher requested a review from yhakbar as a code owner April 15, 2026 20:46
@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@diofeher has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 18 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 18 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f909f04b-8ed6-4eaa-83ec-5a5cb704db3d

📥 Commits

Reviewing files that changed from the base of the PR and between de26746 and 6f3f393.

⛔ Files ignored due to path filters (1)
  • vscode-extension/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • vscode-extension/.vscodeignore
  • vscode-extension/docs/development.md
  • vscode-extension/esbuild.js
  • vscode-extension/package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/bundle-vscode-extension

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Explain how vsce's vscode:prepublish hook chains into esbuild bundling
and the Go binary build, what ends up in the VSIX, and how to produce
one locally.
@diofeher
diofeher marked this pull request as draft April 15, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant