From 849fa886c7c3b4539a5fcee015d93f0aa65128f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Wouts?= Date: Fri, 28 Apr 2023 10:26:51 +1000 Subject: [PATCH] ux(cli): do not automatically open the browser There are a number of use cases where this behaviour isn't desirable. This is consistent with Vite behaviour, which has an --open flag. --- integrations/cli/src/main.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/integrations/cli/src/main.ts b/integrations/cli/src/main.ts index b275910ddd2..aea915bf101 100644 --- a/integrations/cli/src/main.ts +++ b/integrations/cli/src/main.ts @@ -4,7 +4,6 @@ import { load } from "@previewjs/loader"; import chalk from "chalk"; import { program } from "commander"; import { readFileSync } from "fs"; -import open from "open"; import url from "url"; const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); @@ -47,7 +46,6 @@ program const port = parseInt(options.port); await workspace!.preview.start(async () => port); - await open(`http://localhost:${port}`); }); program.parseAsync(process.argv).catch((e) => {