build(vscode): minify release bundles and allowlist the VSIX contents - #24
Open
fi3ework wants to merge 1 commit into
Open
build(vscode): minify release bundles and allowlist the VSIX contents#24fi3ework wants to merge 1 commit into
fi3ework wants to merge 1 commit into
Conversation
Two build modes, selected through rslib's `--env-mode`: `build:local` / `watch:local` (`--env-mode dev`) keep readable output with source maps so breakpoints in `src/` bind in the dev host; plain `build` — what CI and the Release workflow run — minifies and emits no source maps. Previously every build shipped rslib's lightly-compressed default (1.4 MB `extension.js`); the release bundle is now 577 kB. `.vscodeignore` becomes an allowlist (`dist/**/*.js`, `dist/**/*.node`, icon, LICENSE, README, package.json), so source maps or anything else a local build leaves in `dist/` can never reach the VSIX. `cross-env` is dropped: the env mode travels as a CLI flag.
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
--env-mode:build:local/watch:local(--env-mode dev): readable output + source maps, so breakpoints insrc/bind in the dev host (the F5 playground task already useswatch:local).build(CI and the Release workflow): minified, no source maps.extension.jsgoes from 1.4 MB (rslib's lightly-compressed default) to 577 kB; the darwin-arm64 VSIX packs to ~546 KB..vscodeignoreis now an allowlist —dist/**/*.js,dist/**/*.node, icon, LICENSE, README, package.json — so source maps or anything else a local build leaves indist/never reach the VSIX. Verified: after abuild:local,vsce lslists no.map.cross-envdropped; the mode travels as a CLI flag instead of an ad-hoc env var.Related Links
N/A
Checklist
pnpm lint && pnpm test:unitgreen;smoke,rstestandvscodeE2E slices pass against the minified build.