VS Code extension packaging tool that reuses the core logic of `vsce pack` and fixes the long‑standing pnpm compatibility gap.
npm install vsce-pnpmVS Code extension packaging tool that reuses the core logic of vsce pack and fixes the long‑standing pnpm compatibility gap.
The official @vscode/vsce package assumes npm-style dependency layouts and calls npm list internally. In pnpm projects this causes two major problems:
1. npm list fails with npm ERR! missing because pnpm uses a virtual store and symlinked node_modules.
2. pnpm dependency symlinks are not respected, so authors are forced to bundle dependencies and use vsce --no-dependencies, which is inconvenient and diverges from normal workflows.
vsce-pnpm keeps the packaging behavior you already know, but adds correct dependency resolution for pnpm (including monorepos) and supports npm/yarn/pnpm consistently.
- One command only: vsce-pnpm, flags compatible with vsce pack
- Auto-detects npm / yarn / pnpm
- Manual override via --npm / --yarn / --pnpm
- Proper pnpm dependency resolution (virtual store + symlinks)
- Friendly error messages and clear logs
- Based on @vscode/vsce source (MIT)
``bash`
pnpm add -D vsce-pnpmor
npm i -D vsce-pnpmor
yarn add -D vsce-pnpm
`bashinside your extension project
pnpm exec vsce-pnpm pack
Force a package manager:
`bash
vsce-pnpm pack --pnpm
vsce-pnpm pack --yarn
vsce-pnpm pack --npm
`Example:
`bash
vsce-pnpm pack --pnpm
`Differences vs
vsce- Only implements
package (no publish, no marketplace auth)
- Correct pnpm dependency resolution (virtual store + symlinks)
- Monorepo-friendly lockfile discovery
- Uses the same flags as vsce package, but logs/errors are more explicitFAQ
Why not just use
@vscode/vsce?
If you use pnpm, vsce relies on npm list and npm-style layouts. This causes missing dependency errors and forces you to bundle dependencies manually. vsce-pnpm removes that friction while preserving the same packaging behavior.Does this change what gets packaged?
It follows the same file collection logic as
vsce package, but resolves dependencies in a pnpm-compatible way. If you already use .vscodeignore, it will be respected.What about multiple versions of a dependency?
vsce-pnpm` keeps pnpm’s nested dependency layout inside the VSIX so each version can be resolved at runtime.Why require a lockfile?
Lockfiles are the only reliable source for deterministic dependency resolution across npm/yarn/pnpm. Without them, the packaged output is not reproducible.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.