Remix Vite plugin migration error (classic compiler removed) in CI
Remix moved from its classic esbuild compiler to a Vite plugin. After migrating, remix build is replaced by vite build, and many remix.config.js options move into the Vite config. Leftover classic options or a missing plugin entry break the build in CI.
What this error means
The build errors that a remix.config.js option is not recognized, that the Remix Vite plugin is missing, or that remix build no longer exists after the migration.
Error: The "remix.config.js" file is no longer used by the Remix Vite plugin.
Move supported options into the `remix()` plugin in vite.config.ts.Common causes
Classic config options left behind
Options like serverBuildPath or assetsBuildDirectory live in remix.config.js for the classic compiler but must move into the Vite plugin config.
The build script still calls remix build
After migrating, the build command is vite build; a remix build script no longer applies and fails or does nothing useful.
How to fix it
Add the Remix Vite plugin and update scripts
- Add
@remix-run/devVite plugin tovite.config.ts. - Change the build script from
remix buildtovite build. - Move supported options from
remix.config.jsinto theremixVitePluginoptions.
// vite.config.ts
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
export default defineConfig({ plugins: [remix()] });Fix the build command
Update package scripts so CI runs the Vite build, not the removed classic compiler.
"scripts": { "build": "remix vite:build" }How to prevent it
- Follow the official Vite migration guide end to end before pushing.
- Remove
remix.config.jsoptions that the Vite plugin does not support. - Confirm
vite buildruns clean locally before running it in CI.