summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Louis Escher <66965600+louisescher@users.noreply.github.com> 2024-10-09 12:12:22 +0200
committerGravatar GitHub <noreply@github.com> 2024-10-09 11:12:22 +0100
commitc6fd1df695d0f2a24bb49e6954064f92664ccf67 (patch)
treeafa823df7eafbe6051a83cddf293532492882b62
parentcf24d6922adf5ee6e8d7741da662f33b3a1c23c3 (diff)
downloadastro-c6fd1df695d0f2a24bb49e6954064f92664ccf67.tar.gz
astro-c6fd1df695d0f2a24bb49e6954064f92664ccf67.tar.zst
astro-c6fd1df695d0f2a24bb49e6954064f92664ccf67.zip
Fix mts reloads (#12160)
* Add mts file extension to configRE regex * Add changeset * Apply suggestions from code review Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
-rw-r--r--.changeset/mean-bags-shave.md5
-rw-r--r--packages/astro/src/core/dev/restart.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/mean-bags-shave.md b/.changeset/mean-bags-shave.md
new file mode 100644
index 000000000..88263fa05
--- /dev/null
+++ b/.changeset/mean-bags-shave.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixes a bug where `astro.config.mts` and `astro.config.cts` weren't reloading the dev server upon modifications.
diff --git a/packages/astro/src/core/dev/restart.ts b/packages/astro/src/core/dev/restart.ts
index 30821362c..b7eab38af 100644
--- a/packages/astro/src/core/dev/restart.ts
+++ b/packages/astro/src/core/dev/restart.ts
@@ -30,7 +30,7 @@ async function createRestartedContainer(
return newContainer;
}
-const configRE = /.*astro.config.(?:mjs|cjs|js|ts)$/;
+const configRE = /.*astro.config.(?:mjs|mts|cjs|cts|js|ts)$/;
function shouldRestartContainer(
{ settings, inlineConfig, restartInFlight }: Container,