Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge React Refresh runtime and transformer #10056

Merged
merged 2 commits into from
Dec 23, 2024
Merged

Conversation

devongovett
Copy link
Member

This removes @parcel/runtime-react-refresh and merges its logic into @parcel/transformer-react-refresh-wrap. The initialization logic moves into an init helper function instead of being run in the runtime. This avoids mismatching versions, and mismatching logic for when refresh is applied. For example, the transformer looks at dependencies in the asset, whereas the runtime looked at the package.json only for entry assets. For bundles that have no entry assets (which is the case for all React Server Components bundles), the runtime would never be injected at all. Moving it into the transformer also deduplicates the logic into a single place instead of injecting into every bundle.

@devongovett devongovett merged commit 8a15d0c into v2 Dec 23, 2024
17 checks passed
@devongovett devongovett deleted the react-refresh-merge branch December 23, 2024 03:41
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.

1 participant