aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.34k stars 50 forks source link

vite marked as peerDependency but uses direct import from vite #161

Closed MarZab closed 2 weeks ago

MarZab commented 3 weeks ago

vite is used as a direct dependancy in the project but marked as only a peer in package.json.

The issue materialises itself with using yarn with nodeLinker: pnpm that has strict package dependency resolution.

The temporary fix is to mark vite as a dependancy in .yarnrc.yml

nodeLinker: pnpm

packageExtensions:
  "vite-tsconfig-paths@*":
    dependencies:
      vite: "*"
aleclarson commented 2 weeks ago

Seems like an issue with Yarn? Peer dependencies are meant to be directly imported.