Update resolve.conditions
to include defaults
In previous Vite versions, the resolve.conditions
option had defaults that were added internally (i.e. ['module', 'browser', 'development|production']
).
This default was removed in Vite 6, so this migration adds it to your existing configuration to ensure that the behavior remains intact.
Learn more: https://vite.dev/guide/migration#default-value-for-resolve-conditions
Remix does not currently support Vite 6 and therefore any vite.config
file for Remix will not be migrated.
Sample Code Changes
1import { defineConfig } from 'vite';
2
3export default defineConfig({
4 resolve: {
5 conditions: ['require'],
6 },
7 build: {
8 outDir: 'dist',
9 },
10});
11