feat: add warning to discourage Vite with yarn pnp#21906
feat: add warning to discourage Vite with yarn pnp#21906sapphi-red wants to merge 1 commit intovitejs:mainfrom
Conversation
|
That's understandable but very disappointing. Yarn PnP may not provide the best DX for development, but allows to speed up CI jobs dramatically by avoiding unnecessary I/O (I've seen 20+ seconds saved on each job just by turning on PnP!) and is the easiest way to catch bugs in declared dependencies. |
@vitejs/plugin-legacy
vite
commit: |
|
I propose we take a plugin approach if this is feasible? e.g. |
|
Please consider adding a flag to make this warning skippable. I already have an unskippable warning from storybook telling me to stop using Yarn PnP. As the author of the linked bug (and many others in vite, vitest and storybook relating to pnp support) I'm more than willing to take the risk locally of using PnP, so these warnings are quite annoying noise. In terms of supporting yarn in vite, I've found that a very trivial plugin to intercept |
Adding the following message to discourage people from using yarn pnp with Vite:
While yarn defaults to yarn pnp when running
yarn set version stable, maintaining a dedicated code path to support it has been a consistent maintenance overhead for the Vite team. Given that users can easily opt out of PnP by settingnodeLinker: node-modulesin their.yarnrc.yml, I think it is the right call to discourage its use and allocate time on the other areas.If someone is willing to maintain the yarn pnp support in Vite including all the upstream dependencies and also fixes, #15809, we can remove this warning.