Skip to content

Conversation

@kedarvartak
Copy link

Fixes dev server incorrectly creating dist folder and copying fonts when using q+enter to quit.

Changes

  • Added isBuild check in buildEnd() hook to prevent font copying during dev server shutdown
  • Font copying now only occurs during astro build, not when stopping dev server with q+enter
  • Added test case to verify no dist folder is created when dev server stops
  • Changeset added: fix-dev-quit-fonts-dist-creation.md

Testing

  • Added test: "Does not create dist folder or copy fonts when dev server stops"
  • Manual verification that q+enter no longer creates dist folder or copies fonts
  • Verified fonts still work correctly in dev mode
  • Verified astro build still copies fonts as expected

Docs

No docs changes needed. This fixes incorrect behavior in dev mode. User-facing behavior remains the same.

…dev server shutdown and add a test case to verify this behavior.
… files when stopping the dev server with the experimental Fonts API.
@changeset-bot
Copy link

changeset-bot bot commented Jan 12, 2026

🦋 Changeset detected

Latest commit: 8cbbcbb

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 12, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 12, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing kedarvartak:fix/prevent-fonts-dist-on-dev-quit (8cbbcbb) with main (2fa19c4)

Summary

✅ 9 untouched benchmarks

Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good!

@florian-lefebvre
Copy link
Member

florian-lefebvre commented Jan 12, 2026

The test is failing, can you look into that?

@florian-lefebvre
Copy link
Member

Ping me when tests pass and I'll be happy to review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants