Skip to content

Separate Vite plugin from runtime to avoid including Vite in production installs #206

@koutaro-masaki

Description

@koutaro-masaki

First, thank you for this library. I am very satisfied with it and it fits my use case well.

I would like to describe a practical issue I am running into with the current package structure.

@generouted/react-router provides both runtime components and a Vite plugin.
Currently, these are distributed together as a single package, and vite is declared as a peer dependency.

  "peerDependencies": {
    "react": ">=18",
    "react-router": ">=7",
    "vite": ">=5"
  }

Because the Vite plugin and runtime are bundled into the same package, vite is pulled in during production installs as part of dependency resolution.
Build-time tools such as vite and its transitive dependencies (e.g. esbuild and @esbuild/*), which are not required at runtime, are included in production installs and cannot be excluded from dependency and license checks.

Would it be possible to split the runtime and Vite plugin into separate packages?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions