Skip to content

fix: exclude bundled dependencies from the packaged extension - #261

Merged
vycdev merged 2 commits into
developfrom
fix/exclude-bundled-node-modules
Oct 24, 2026
Merged

vycdev merged 2 commits into
developfrom
fix/exclude-bundled-node-modules

Conversation

@vycdev

@vycdev vycdev commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Webpack bundles every runtime dependency into out/extension.js, so the node_modules folder vsce was packaging (2,519 files, 5.85 MB unpacked) is never loaded. The only node_modules paths in the bundle point at VS Code's own built-in ripgrep.

  • Add node_modules/** to .vscodeignore.
  • Add a changelog line under Development.

Verification

  • vsce package (3.9.2): 37 files, 2.71 MB, down from 2,556 files and 5.06 MB.
  • Unpacked the new .vsix and loaded out/extension.js in plain Node with a stub vscode module and no node_modules: it loads and exports activate.
  • Still needs the manual smoke test in VS Code before release.

Webpack already bundles every runtime dependency into out/extension.js, so the packaged node_modules folder (2,519 files) was unused. The .vsix shrinks from 5.06 MB to 2.71 MB. Verified the packaged bundle loads without node_modules.
@vycdev
vycdev merged commit b2ae153 into develop Oct 24, 2026
4 checks passed
@vycdev
vycdev deleted the fix/exclude-bundled-node-modules branch October 24, 2026 17:56
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