Support for React Router 7

Hi, I am currently developing an app using React Router 7 (which is Remix 3, basically) and can’t deploy it. It’s being detected as a Vite project, which expects static files. If I pick the Remix framework, it also doesn’t work.

This is a new app, not migrated from an older version, btw.

Any news on when this framework will be supported?

4 Likes

Hi @tomekbuszewski, I’ll try and recreate this for debugging. I’ll update you here when I’m done.

Welcome to the Vercel community! Thanks for posting this question here.

1 Like

Hi @tomekbuszewski, you are right, by default the Vercel platform doesn’t pick the correct deployment configuration.

Upon some digging, I found this Vercel template from the React Router team that works both locally and on Vercel (my deployment).

This template sets up the build output from React Router into the correct format expected by Vercel.

I hope this solves the issue you are facing.

1 Like

Hey, it works! Thanks a lot! I would prefer to have it as an option, like with older Remix and Next, but for now, this is totally fine!

Thank you again!

1 Like

Thanks for your feedback. I’ll relay it to the product team and we’ll definitely improve this area.

Hey, sorry for coming back to the topic, but it turns out, the template you provided doesn’t work with prerendering. If I remove the ssr part in the Vite config, everything works:

  build: {
    rollupOptions: isSsrBuild
      ? {
          input: "./server/app.ts",
        }
      : undefined,
  },

Otherwise, it just throws [react-router] Cannot convert undefined or null to object during the build.

I am in the middle of a migration from remix2 to react-router v7.
Will there be a preset for supporting RR7 as a framework in Vercel, is that something you are considering? I want to be sure that the template shared earlier in this conversation is still the way to go. I don’t mind waiting, just want to be sure I am making the right call.
Thanks for the amazing support!

2 Likes

Reading the messages from @leerob, Vercel is or will be working on a preset for RR7 Framework:

We have fully migrated our staging to RR7 using the Vercel template, but we now encounter quite some issues which we did not encounter with the remix preset. So hopefully it will be fixed once they have a preset for RR7.

2 Likes

Having a dedicated present would be very much appreciated!!
I have managed to deploy my web using the current Remix present and installed a dependency I don’t need locally, but the preset requires (@remix-run/dev and @remix-run/node).
It works, but this sort of build does not fully support some of the key features of the newer version of the React router.

4 Likes

Is there any updated on this?

Any updates on this?

Hi there, we don’t have any updates on this yet. We will update this post as soon as we have an update.

3 Likes

Thanks. I bet there are a ton of people trying to get this to work (me included).

3 Likes

Thanks for working on this. :+1: We’re waiting on this too.

1 Like

Thanks for checking this out, really important feature.

We are waiting for this as well… React Router V7 framework support is very important. Would be great to get an ETA? Thanks!

1 Like

Any updates on this?

Are there any updates on this? I am also on standby for this; I will not consider using Vercel until this is addressed.

1 Like