Skip to content

Conversation

@stefanvanburen
Copy link
Member

@stefanvanburen stefanvanburen commented Jan 21, 2026

The publish workflow is yelling at us because we're including "263 files out of which 200 are JavaScript files. For performance reasons, you should bundle your extension". This attempts to do that, following the linked guide with the esbuild approach, alongside some minor tweaks.

The biggest additions in LoC here are just the esbuild and npm-run-all dependencies (following along the guide). We could probably drop the npm-run-all if we want to skip including the watch script targets in package.json, 🤷.

This should be validated by the tests, which load up the extension.

Ref: https://github.com/bufbuild/vscode-buf/actions/runs/21229578613
Ref: https://code.visualstudio.com/api/working-with-extensions/bundling-extension

The publish workflow is yelling at us because we're including "263 files
out of which 200 are JavaScript files. For performance reasons, you
should bundle your extension". This attempts to do that, following the
linked guide with the esbuild approach, alongside some minor tweaks.

The biggest additions in LoC here are just the `esbuild` and
`npm-run-all` dependencies (following along the guide). We could
probably drop the `npm-run-all` if we want to skip including the `watch`
script targets in package.json, 🤷.

This should be validated by the tests, which load up the extension.

Ref: https://github.com/bufbuild/vscode-buf/actions/runs/21229578613
Ref: https://code.visualstudio.com/api/working-with-extensions/bundling-extension
@stefanvanburen stefanvanburen force-pushed the svanburen/bundle-extension branch from 557d236 to fbe83af Compare January 21, 2026 23:42
@stefanvanburen stefanvanburen marked this pull request as ready for review January 21, 2026 23:42
doriable
doriable previously approved these changes Jan 22, 2026
In package.json, we switched around the `package` script to run the
actual `esbuild` command to create the dist/ output, _not_ run `vsce
package` as it previously did. `vsce package` will run `package` because
of the `vscode:prepublish` script, but we want to update the Makefile to
do the same thing it did previously (build the `.vsix` file) and the
publish workflow to do the same.
@stefanvanburen
Copy link
Member Author

@doriable minor fix in a4df508; from reworking the npm scripts to match the suggested ones in the linked doc, I also needed to update the Makefile/publish.yml to call the raw vsce publish command which will actually build the .vsix file.

@stefanvanburen stefanvanburen merged commit 5d717cf into main Jan 22, 2026
8 checks passed
@stefanvanburen stefanvanburen deleted the svanburen/bundle-extension branch January 22, 2026 18:10
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.

3 participants