Make Babel an optional peer dependency#203
Conversation
rschristian
left a comment
There was a problem hiding this comment.
Not sure that I love the idea of doing this outside a major, the majority of Vite users will likely experience a (minor) breakage with this as package managers will remove their required Babel deps.
There's a very WIP branch for a new major, I'm thinking it's better to roll this into that.
Huh? Peer deps aren't automatically uninstalled by package managers... |
If you go from dep -> optional peerDep, the pm can remove it, yes. It isn't guaranteed they'll keep around optional peer deps. I would need to check latest versions as I don't know current behavior off the top of my head, but I know NPM used to consistently do that for sure. |
|
Do we know if the majority of Vite users are still depending on Babel? Vite moved away from Babel with 8, didn't it? |
|
Vite 8 just came out, there's always a long tail of users on older versions (and we support back to Vite 2). Only 18% of Vite users can actually forgo Babel. |
|
Thank you, that's helpful context. Are you talking about #174? I can retarget that branch if you'd prefer? |
When combined with preactjs/prefresh#614, Babel is no longer in the dependency tree.