Skip to content

Conversation

@gabrielmfern
Copy link
Member

@gabrielmfern gabrielmfern commented Oct 17, 2025

Closes #2378.

I've tested this on a reproduction similar to what #2378 provides, and it worked after this change on the preview version from pkg.pr.new/


Summary by cubic

Fixes broken hot reloading for imports with non-JS extensions by correcting dependency path resolution in the preview hot-reloading graph. Explicit extensions are now respected, so CSS and image imports reload as expected.

  • Bug Fixes
    • If an import includes an extension and the file exists, use it directly.
    • Only run extension fallback checks when the path doesn’t exist, ensuring non-JS assets are tracked and reload properly.

@vercel
Copy link

vercel bot commented Oct 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-email Ready Ready Preview Comment Oct 17, 2025 1:46pm
react-email-demo Ready Ready Preview Comment Oct 17, 2025 1:46pm

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: a4b87b9

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

This PR includes changesets to release 2 packages
Name Type
react-email Patch
@react-email/preview-server Patch

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 17, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email@2572

commit: a4b87b9

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@gabrielmfern gabrielmfern merged commit 542587b into canary Oct 17, 2025
16 checks passed
@gabrielmfern gabrielmfern deleted the fix/non-js-files-hot-reloading branch October 17, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview server: Unable to access json/svg file

3 participants