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

fix: throw when refresh runtime is loaded twice (fix #101) #108

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

ArnaudBarre
Copy link
Member

Fix #101

@ArnaudBarre ArnaudBarre self-assigned this Feb 14, 2023
@sapphi-red
Copy link
Member

I’m afraid this doesn't work.
preambleCode is injected by transformIndexHtml that doesn't run with backend integration.

transformIndexHtml() {
if (!skipFastRefresh)
return [
{
tag: 'script',
attrs: { type: 'module' },
children: preambleCode.replace(`__BASE__`, devBase),
},
]
},
}

@ArnaudBarre
Copy link
Member Author

Oh yeah true this should be in the runtime code so!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ArnaudBarre ArnaudBarre force-pushed the fix-duplicate-runtime branch from 92162c6 to 13cd4a4 Compare February 18, 2023 02:05
@ArnaudBarre ArnaudBarre merged commit 6756b85 into main Feb 18, 2023
@ArnaudBarre ArnaudBarre deleted the fix-duplicate-runtime branch February 18, 2023 11:14
ArnaudBarre added a commit that referenced this pull request Jul 8, 2023

Verified

This commit was signed with the committer’s verified signature.
christophehurpeau Christophe Hurpeau
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.

HMR not working with backend integration
2 participants