-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
adopt Vite builds #13565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adopt Vite builds #13565
Conversation
|
Hi @punkpeye, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
FWIW I think tsup provides a "chunk" config option which allows you to get the same result as you're trying to achieve, I might be wrong but thats what I used in react-router-devtools |
I could not figure out a way to do it based on their documentation and/or community resources (GitHub issues, etc). Meanwhile, Vite configuration is pretty straightforward. I would also argue that it benefits React Router to adopt Vite simply because the project is a lot more popular than tsup (24.9m vs 1.5m downloads). Finally, this project already uses Vite in many other parts of the mono-repo. Moving to Vite builds provides a nice way to reduce the number of different tools that the project depends on. |
I have the same pain of breaking patches every time I upgrade React Router and wrote about it here: #13076 |
A change of this magnitude will need to go through a github proposal discussion so we can get the right folks involved, and decide if we want to move away from tsup and what we want to move to. We would be open to accepting a PR with a small change to the current tsup configs to avoid the hashed names. |
For anyone discovering this PR, please chip in to the discussion here #13076 |
For context, the current build (using
tsup
) bundles code and produces hashed output, e.g.,This makes it hard to trace origin of errors and patch
react-router
.In contrast, Vite approach produces unbundled/stable outputs.
Example:
The benefit of this approach is that it enables easier to follow stack traces and allows to patch
react-router
as needed.