From d2c237c42ddf0862a1ed1e2b4a5e2d5380ed7972 Mon Sep 17 00:00:00 2001 From: Vladyslav Dalechyn Date: Fri, 26 Apr 2024 17:16:32 +0300 Subject: [PATCH] fix: devtools watch mode (#257) * fix(devtools): disable watch for standalone mode * chore: changesets --- .changeset/wild-ladybugs-double.md | 5 +++++ src/cli/vite/dev.ts | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changeset/wild-ladybugs-double.md diff --git a/.changeset/wild-ladybugs-double.md b/.changeset/wild-ladybugs-double.md new file mode 100644 index 00000000..26cd7532 --- /dev/null +++ b/.changeset/wild-ladybugs-double.md @@ -0,0 +1,5 @@ +--- +"frog": patch +--- + +Disabled watch process when frog CLI is called outside of a project directory. diff --git a/src/cli/vite/dev.ts b/src/cli/vite/dev.ts index 42e9e100..f0314c34 100644 --- a/src/cli/vite/dev.ts +++ b/src/cli/vite/dev.ts @@ -164,9 +164,12 @@ export function devServer(options?: DevServerOptions): VitePlugin { config: () => { return { server: { - watch: { - ignored: options?.ignoreWatching ?? defaultOptions.ignoreWatching, - }, + watch: options?.injectClientScript + ? { + ignored: + options?.ignoreWatching ?? defaultOptions.ignoreWatching, + } + : null, }, } },