0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00

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>
This commit is contained in:
Louis Escher 2024-10-09 12:12:22 +02:00 committed by GitHub
parent cf24d6922a
commit c6fd1df695
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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.

View file

@ -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,