Skip to content

Make vuetify a peer dependency #358

@Justineantoine

Description

@Justineantoine

Currently, Vuetify is installed as a direct dependency of @girder/components.
Since the library is designed to be used inside host applications that already configure their own Vuetify instance, this can lead to several issues:

  • Multiple Vuetify versions installed in the same project
  • Duplicated Vuetify instances and inconsistent behavior
  • Harder integration with custom Vuetify configurations (icons, themes, locales, etc.)
  • Increased bundle size
  • Potential version conflicts between the library and the host app

To align with common best practices for Vue UI libraries, Vuetify should be declared as a peer dependency instead of a direct dependency.

Proposed change

  • Move vuetify from dependencies to peerDependencies
  • Optionally keep it in devDependencies for local development and testing
  • Document the required Vuetify version in the README

Benefits

  • Ensures a single Vuetify instance in the host application
  • Gives full control of Vuetify configuration to the consuming app
  • Avoids version conflicts and duplicated code
  • Aligns with ecosystem standards for component libraries

Notes

This change is especially important now that the library targets Vue 3 and Vuetify 3, where applications often have custom Vuetify setups that should not be overridden by the library.

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