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

HMR hoisted scripts #3336

Merged
merged 5 commits into from
May 11, 2022
Merged

HMR hoisted scripts #3336

merged 5 commits into from
May 11, 2022

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented May 10, 2022

Changes

Testing

Manually tested via an example.

Docs

N/A, bug fix.

@changeset-bot
Copy link

changeset-bot bot commented May 10, 2022

🦋 Changeset detected

Latest commit: aa713d4

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

This PR includes changesets to release 1 package
Name Type
astro 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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope) labels May 10, 2022
// HMR hoisted script only exists to make them appear in the module graph.
if(opts?.ssr) {
return {
code: ''
Copy link
Member

Choose a reason for hiding this comment

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

nit: can this be a comment like /* client hoisted script, empty in SSR */? Bonus if it can also include the file path or some other useful debug info.

Copy link
Member

@FredKSchott FredKSchott left a comment

Choose a reason for hiding this comment

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

LGTM with 1 small comment

@github-actions github-actions bot added the test label May 10, 2022
@FredKSchott FredKSchott removed the test label May 10, 2022
@matthewp matthewp merged commit ccea6a0 into main May 11, 2022
@matthewp matthewp deleted the script-hmr branch May 11, 2022 15:23
@github-actions github-actions bot mentioned this pull request May 11, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* HMR hoisted scripts

* Add to the dep graph

* Remove example change

* Adds changeset

* Fix markdown test
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) pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: Dynamic JSX elements do not update without manually restarting the dev server
2 participants