Skip to content

feat(vite-plugin-angular): add Vite Plugin Registry compatibility #2175

@brandonroberts

Description

@brandonroberts

Which scope/s are relevant/related to the feature request?

vite-plugin-angular

Information

The Vite Plugin Registry is a searchable directory that automatically discovers plugins from npm daily based on keywords and peer dependencies. @analogjs/vite-plugin-angular already has the vite-plugin keyword needed for discovery, but is missing Vite version compatibility metadata — the package only declares @angular-devkit/build-angular and @angular/build as peer dependencies, not vite itself. This means the registry can't auto-detect which Vite versions are supported.

Steps

1. Add vite as an optional peer dependency in packages/vite-plugin-angular/package.json

The registry extracts compatibility from peerDependencies. Add:

"peerDependencies": {
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
  ...
}

And mark it as optional in peerDependenciesMeta:

"peerDependenciesMeta": {
  "vite": {
    "optional": true
  },
  ...
}

2. Add compatiblePackages extended metadata to packages/vite-plugin-angular/package.json

This provides explicit compatibility info for the registry beyond what peer deps provide:

"compatiblePackages": {
  "schemaVersion": 1,
  "vite": { "type": "compatible", "versions": "^6.0.0 || ^7.0.0 || ^8.0.0" },
  "rollup": { "type": "compatible", "versions": "^4.0.0", "note": "Via Vite 6 and 7" },
  "rolldown": { "type": "compatible", "versions": "^1.0.0", "note": "Via Vite 8+" }
}

3. Add compatibility badge to packages/vite-plugin-angular/README.md

![Vite compatibility](https://registry.vite.dev/api/badges?package=@analogjs/vite-plugin-angular&tool=vite)

4. Verify listing

After the next publish, confirm the plugin appears on registry.vite.dev with correct compatibility data.

References

Describe any alternatives/workarounds you're currently using

No current workaround. The plugin is discoverable via the vite-plugin keyword but shows no Vite version compatibility information.

I would be willing to submit a PR to fix this issue

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions