Back to all fixes
CuratedTypeScriptVite 8local
rolldown-vite fails to resolve external deps under Yarn PnP
Problem
With Yarn Plug'n'Play (PnP) and rolldown-vite, both `vite dev` and `vite build` fail to resolve external packages (e.g. throwing resolve errors for packages that are installed and work fine with plain node_modules or with classic Vite). Reproduced on Windows and Linux under Yarn 4.9.1 PnP; node_modules installs are unaffected.
Solution
typescript
PnP resolution was unsupported in early rolldown-vite releases; a native PnP resolver was added. Confirmed working reproduction on rolldown-vite v7.0.7 (fixed between 7.0.3 and 7.0.7 — 7.0.3/7.0.4 still failed). Upgrade to rolldown-vite >= 7.0.7 (or the equivalent Vite 8 release) to get PnP module resolution working. Note: some plugin-specific PnP resolution gaps remained afterward (e.g. vite-plugin-pwa failing to resolve its own virtual-module deps) and were tracked as separate follow-up issues — if you hit a resolve error for a specific plugin's dependency after upgrading, treat it as a distinct bug rather than this one.