diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 85d1f16c536ac6..5caa09d3429542 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -966,15 +966,16 @@ export async function resolveConfig( // Merge default environment config values const defaultEnvironmentOptions = getDefaultEnvironmentOptions(config) // Some top level options only apply to the client environment - const defaultClientEnvironmentOptions = { + const defaultClientEnvironmentOptions: UserConfig = { ...defaultEnvironmentOptions, optimizeDeps: config.optimizeDeps, } - const defaultNonClientEnvironmentOptions = { + const defaultNonClientEnvironmentOptions: UserConfig = { ...defaultEnvironmentOptions, dev: { ...defaultEnvironmentOptions.dev, createEnvironment: undefined, + warmup: undefined, }, build: { ...defaultEnvironmentOptions.build,