Skip to content

chore: bundle extension with esbuild - #43

Open
jschfflr wants to merge 1 commit into
mainfrom
chore/esbuild-bundling
Open

chore: bundle extension with esbuild#43
jschfflr wants to merge 1 commit into
mainfrom
chore/esbuild-bundling

Conversation

@jschfflr

Copy link
Copy Markdown
Contributor

Summary

  • Replace tsc-emit with esbuild-bundled out/extension.js (~64 KB minified).
  • Parallel compile / watch (tsc --noEmit + esbuild) via npm-run-all2, matching the official VS Code extension pattern so editor type errors and bundle errors surface side-by-side.
  • npm run package now runs the production esbuild step before vsce package.
  • out/ shrinks from a multi-file tree to a single bundled file; .vsix drops to 7 files / 35 KB.

Lays the groundwork for adding fast-xml-parser as a runtime dep in the upcoming SOAP-mostly migration; bundling is the cleanest way to ship that without breaking the project's zero-shipped-runtime-deps posture.

Test plan

  • npm test (244/244 unit tests pass — they use a separate tsc-test pipeline, unaffected)
  • npm run compile runs typecheck + bundle in parallel; both succeed
  • npm run package produces a clean .vsix (7 files, 35 KB, only out/extension.js + metadata; no node_modules, no src, no sourcemaps)
  • F5-launch the extension dev host locally and exercise core commands (init workspace, refresh, set PAT) to confirm the bundle has no runtime issues
  • Confirm npm run watch rebuilds on save in both pipelines

🤖 Generated with Claude Code

Replace the per-file tsc emit with a single esbuild-bundled
out/extension.js. Adds esbuild + npm-run-all2 as devDeps, splits
compile/watch into parallel typecheck + bundle, and wires the prod
build into the package script. .vsix shrinks from a multi-file emit
to a 7-file / 35 KB archive.

Foundation for the SOAP-mostly migration's parser swap, where
fast-xml-parser becomes a runtime dep that needs to ship inside the
bundle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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