diff --git a/.changeset/popular-carrots-sneeze.md b/.changeset/popular-carrots-sneeze.md new file mode 100644 index 0000000000..0f914891dc --- /dev/null +++ b/.changeset/popular-carrots-sneeze.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Open to configured `base` when `astro dev --open` runs diff --git a/packages/astro/src/core/dev/container.ts b/packages/astro/src/core/dev/container.ts index d4e41e96d4..b48d4c7b54 100644 --- a/packages/astro/src/core/dev/container.ts +++ b/packages/astro/src/core/dev/container.ts @@ -56,7 +56,9 @@ export async function createContainer({ settings = injectImageEndpoint(settings); } - const { host, headers, open } = settings.config.server; + const { base, server: { host, headers, open: shouldOpen }} = settings.config; + // Open server to the correct path + const open = shouldOpen ? base : false; // The client entrypoint for renderers. Since these are imported dynamically // we need to tell Vite to preoptimize them.