When initializing a bundled extension project, the generator does not automatically include dependencies: false in the generated package.json manifest.
Most modern package managers (specifically pnpm, but also npm and yarn) continue to include a node_modules folder or resolve dependencies (npm list --depth 9999) unless explicitly told otherwise (dependencies: false). For extensions that are bundled (e.g., into dist/extension.js), including these dependencies in the VSIX is unnecessary and increases the package size and runs the npm list --depth 9999 command.
Proposed Change
Update the generator to include dependencies: false in the manifest by default whenever a user selects a "bundled" project configuration. This should apply regardless of the chosen package manager.
Context & Dependencies
microsoft/vscode-vsce#1257
While the PR above addresses a race condition to ensure dependencies: false is respected reliably by vsce, the generator should be updated independently to support this field.
Future Work
Once the PR is merged, we should also look into adding support for runPrepublish option specific to each package manager (e.g., pnpm run vscode:prepublish).
When initializing a bundled extension project, the generator does not automatically include
dependencies: falsein the generatedpackage.jsonmanifest.Most modern package managers (specifically pnpm, but also npm and yarn) continue to include a node_modules folder or resolve dependencies (
npm list --depth 9999) unless explicitly told otherwise (dependencies: false). For extensions that are bundled (e.g., intodist/extension.js), including these dependencies in the VSIX is unnecessary and increases the package size and runs thenpm list --depth 9999command.Proposed Change
Update the generator to include
dependencies: falsein the manifest by default whenever a user selects a "bundled" project configuration. This should apply regardless of the chosen package manager.Context & Dependencies
microsoft/vscode-vsce#1257
While the PR above addresses a race condition to ensure
dependencies: falseis respected reliably byvsce, the generator should be updated independently to support this field.Future Work
Once the PR is merged, we should also look into adding support for
runPrepublishoption specific to each package manager (e.g.,pnpm run vscode:prepublish).