Skip to content

Resolve existing package managers issues (including pnpm) #573

@Mopsgamer

Description

@Mopsgamer

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions