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

Switch appendChild to replaceBefore in hmr script #164

Merged
merged 1 commit into from May 17, 2019
Merged

Switch appendChild to replaceBefore in hmr script #164

merged 1 commit into from May 17, 2019

Conversation

hafffe
Copy link
Contributor

@hafffe hafffe commented Apr 5, 2019

This change is to keep the link tags on the same place in the dom as there where from the beginning. This is to keep the order of css assets.
e.g. if you have a inline style tag last in your document that overwrite css from linked stylesheets, after HMR have compiled and inserted new links to the stylesheets, the the inline styles are still last and the import order for the css rules are still correct

Copy link
Collaborator

@ScriptedAlchemy ScriptedAlchemy left a comment

Choose a reason for hiding this comment

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

What’s the browser support for insertBefore

@hafffe
Copy link
Contributor Author

hafffe commented Apr 5, 2019

It's the same as appendChild
https://caniuse.com/#search=insertBefore

@hafffe
Copy link
Contributor Author

hafffe commented Apr 18, 2019

@ScriptedAlchemy is this one of interest? would really like to see this feature be solved :)

@ScriptedAlchemy
Copy link
Collaborator

fix tests and ill merge @alonalon

@hafffe
Copy link
Contributor Author

hafffe commented May 17, 2019

@ScriptedAlchemy resolved conflicts with old test, but can't find a equivalent test in the new setup

@ScriptedAlchemy ScriptedAlchemy merged commit 98b3f2c into faceyspacey:master May 17, 2019
@faceyspacey
Copy link
Owner

🎉 This PR is included in version 4.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants