Skip to content

missing optional peer #605

Description

@Mister-Hope

Describe the bug

unplugin types needs types from rollup, vite, webpack, esbuild and such:

Image

Note: vite and webpack are already patched using packageExtensions from pnpm, so no more red underscores in screenshot

However, with strict deps resolution (e.g.: enableGlobalVirtualStore: true in pnpm v11 ref), unplugin types fails because these types are unresolvable (not declared as deps):

Image

To ensure users are ok with types, every deps that appears in declaration files shall be declared as optional peer, so if users annouce them as devDependencies when having unplugin as deps, they will still get their code correctly typed since now they are resolvable in unplugin.

Reproduction

not provided as I believe the issue is clear.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions