Skip to content

Commit

Permalink
Fix mts reloads (#12160)
Browse files Browse the repository at this point in the history
* Add mts file extension to configRE regex

* Add changeset

* Apply suggestions from code review

Co-authored-by: Bjorn Lu <[email protected]>

---------

Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: Bjorn Lu <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2024
1 parent cf24d69 commit c6fd1df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/mean-bags-shave.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion packages/astro/src/core/dev/restart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c6fd1df

Please sign in to comment.