diff --git a/npm/vite-dev-server/src/startServer.ts b/npm/vite-dev-server/src/startServer.ts index 324a026802d6..8ce3c92656fd 100644 --- a/npm/vite-dev-server/src/startServer.ts +++ b/npm/vite-dev-server/src/startServer.ts @@ -43,7 +43,7 @@ const resolveServerConfig = async ({ viteConfig, options }: StartDevServer): Pro finalConfig.server = finalConfig.server || {} - finalConfig.server.port = await getPort({ port: 3000, host: 'localhost' }), + finalConfig.server.port = await getPort({ port: finalConfig.server.port || 3000, host: 'localhost' }), debug(`the resolved server config is ${JSON.stringify(finalConfig, null, 2)}`)