Skip to content
Latchkey

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.

remix
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

  1. Add @remix-run/dev Vite plugin to vite.config.ts.
  2. Change the build script from remix build to vite build.
  3. Move supported options from remix.config.js into the remixVitePlugin options.
vite.config.ts
// 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.

package.json
"scripts": { "build": "remix vite:build" }

How to prevent it

  • Follow the official Vite migration guide end to end before pushing.
  • Remove remix.config.js options that the Vite plugin does not support.
  • Confirm vite build runs clean locally before running it in CI.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →