-
Notifications
You must be signed in to change notification settings - Fork 255
Resolve existing package managers issues (including pnpm) #573
Description
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
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).