Open jgarplind opened 5 days ago
Currently, it takes no options, so that would be the place to start. Unfortunately, it doesn't look like an easy task.
Thanks for weighing in! Yeah, that much is clear from looking at the source code. Whether it is an easy task or not is harder for me to tell.
I'm not sure why/if it would be difficult to accept the same arguments as the react
-plugin (or at least the babel
option). I wrote this issue hoping it was more or less forgotten, but of course it seems more likely that there are legitimate technical reasons.
I also need to pass the babel option in order to use styled-components, so I think is a must for a lot of users
We also need babel options because we are using react compiler
Describe what's incorrect/missing in the documentation
https://reactrouter.com/upgrading/router-provider#2-install-the-vite-plugin describes how to adopt the new React Router framework, coming from RouterProvider.
I started this migration, but ran into issues when I realized that the
reactRouter
plugin does not accept the same options as thereact
plugin, which stopped me in my tracks.Specifically, I have the need to add babel plugins both for React compiler: https://react.dev/learn/react-compiler#usage-with-vite and Lingui: https://lingui.dev/tutorials/setup-vite.
In Discord, Kosire suggested I could patch the plugin: https://discord.com/channels/770287896669978684/1309472866453946368/1309472866453946368, which would probably work, but is not very accessible to the average user of the library, and would also be a significant maintenance burden over time, so it's not something I would like to do without being sure it is the only way.
Is this the state of things? Or is there a more appropriate way to handle this scenario, which could then be added to the documentation?