summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2023-08-17 16:51:08 -0500
committerGravatar GitHub <noreply@github.com> 2023-08-17 16:51:08 -0500
commit1f6497c3341231ee76fc4538cfe7624cf4721d56 (patch)
tree13c96b1d537ebff6bdcc149ce300fcd4ff4c20a3
parent1b656233b3c9dc1b90732aa29ea1bf904c2c5f98 (diff)
downloadastro-1f6497c3341231ee76fc4538cfe7624cf4721d56.tar.gz
astro-1f6497c3341231ee76fc4538cfe7624cf4721d56.tar.zst
astro-1f6497c3341231ee76fc4538cfe7624cf4721d56.zip
fix(dev): open to base path (#8123)
-rw-r--r--.changeset/popular-carrots-sneeze.md5
-rw-r--r--packages/astro/src/core/dev/container.ts4
2 files changed, 8 insertions, 1 deletions
diff --git a/.changeset/popular-carrots-sneeze.md b/.changeset/popular-carrots-sneeze.md
new file mode 100644
index 000000000..0f914891d
--- /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 d4e41e96d..b48d4c7b5 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.