From 33ecfd967136f8b05f204168971e7ba607e0eb5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 4 Oct 2023 21:36:00 +0900 Subject: [PATCH] refactor!: remove `server.force` (#14530) --- packages/vite/src/node/config.ts | 13 ------------- packages/vite/src/node/server/index.ts | 7 ------- 2 files changed, 20 deletions(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index e05fe34cc44c2c..6b669e67a3db31 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -810,19 +810,6 @@ export async function resolveConfig( ) } - if ( - config.server?.force && - !isBuild && - config.optimizeDeps?.force === undefined - ) { - resolved.optimizeDeps.force = true - logger.warn( - colors.yellow( - `server.force is deprecated, use optimizeDeps.force instead`, - ), - ) - } - debug?.(`using resolved config: %O`, { ...resolved, plugins: resolved.plugins.map((p) => p.name), diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 4c80b28e168027..ff86fe95dd2176 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -119,13 +119,6 @@ export interface ServerOptions extends CommonServerOptions { sourcemapIgnoreList?: | false | ((sourcePath: string, sourcemapPath: string) => boolean) - /** - * Force dep pre-optimization regardless of whether deps have changed. - * - * @deprecated Use optimizeDeps.force instead, this option may be removed - * in a future minor version without following semver - */ - force?: boolean } export interface ResolvedServerOptions extends ServerOptions {