diff --git a/.changeset/tasty-planes-knock.md b/.changeset/tasty-planes-knock.md new file mode 100644 index 000000000000..3a7a3602e461 --- /dev/null +++ b/.changeset/tasty-planes-knock.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Preserve `--root` CLI flag when restarting dev server diff --git a/packages/astro/src/core/dev/dev.ts b/packages/astro/src/core/dev/dev.ts index 4fcac87fafd1..378a7157ef19 100644 --- a/packages/astro/src/core/dev/dev.ts +++ b/packages/astro/src/core/dev/dev.ts @@ -44,6 +44,7 @@ export default async function dev( beforeRestart: () => console.clear(), params: { settings, + root: options.flags?.root, logging: options.logging, isRestart: options.isRestart, },