diff --git a/packages/vite/src/node/http.ts b/packages/vite/src/node/http.ts index 86fa792072cc2e..af66a6356da05f 100644 --- a/packages/vite/src/node/http.ts +++ b/packages/vite/src/node/http.ts @@ -121,8 +121,7 @@ export async function resolveHttpServer( } export async function resolveHttpsConfig( - https: boolean | HttpsServerOptions | undefined, - cacheDir: string + https: boolean | HttpsServerOptions | undefined ): Promise { if (!https) return undefined diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts index 82640c3ff5c43c..577758357072d6 100644 --- a/packages/vite/src/node/preview.ts +++ b/packages/vite/src/node/preview.ts @@ -82,7 +82,7 @@ export async function preview( const httpServer = await resolveHttpServer( config.preview, app, - await resolveHttpsConfig(config.preview?.https, config.cacheDir) + await resolveHttpsConfig(config.preview?.https) ) setClientErrorHandler(httpServer, config.logger) diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index f51dfb8b19401d..12b93216d15168 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -295,10 +295,7 @@ export async function createServer( ): Promise { const config = await resolveConfig(inlineConfig, 'serve', 'development') const { root, server: serverConfig } = config - const httpsOptions = await resolveHttpsConfig( - config.server.https, - config.cacheDir - ) + const httpsOptions = await resolveHttpsConfig(config.server.https) const { middlewareMode } = serverConfig const resolvedWatchOptions = resolveChokidarOptions({