chore: bundle extension with esbuild - #43
Open
jschfflr wants to merge 1 commit into
Open
Conversation
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>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
out/extension.js(~64 KB minified).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 packagenow runs the production esbuild step beforevsce 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-parseras 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 compileruns typecheck + bundle in parallel; both succeednpm run packageproduces a clean.vsix(7 files, 35 KB, onlyout/extension.js+ metadata; no node_modules, no src, no sourcemaps)npm run watchrebuilds on save in both pipelines🤖 Generated with Claude Code