Support for Remix with Vite

Vercel now supports deploying Remix applications using Vite.

remix.config.js
import { vitePlugin as remix } from '@remix-run/dev';
import { installGlobals } from '@remix-run/node';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { vercelPreset } from '@vercel/remix/vite';
installGlobals();
export default defineConfig({
plugins: [
remix({
presets: [vercelPreset()],
}),
tsconfigPaths(),
],
});

Configuring your Remix application with the Vercel Vite preset.

We've collaborated with the Remix team to add Server Bundles to Remix. Vercel will now detect Remix projects using Vite and optimize them using our new Vite preset (@vercel/remix/vite).

This preset enables adding additional features for Remix on Vercel such as:

  • Streaming SSR: Dynamically stream content with both Node.js and Edge runtimes

  • API Routes: Easily build your serverless API with Remix and a route loader

  • Advanced Caching: Use powerful cache headers like stale-while-revalidate

  • Data Mutations: Run actions inside Vercel Functions

Deploy Remix to Vercel or learn more in the docs.