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

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@alonalon
Copy link

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

@alonalon alonalon requested a review from ScriptedAlchemy as a code owner Apr 5, 2019

@ScriptedAlchemy
Copy link
Collaborator

left a comment

What’s the browser support for insertBefore

@alonalon

This comment has been minimized.

Copy link
Author

commented Apr 5, 2019

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

@alonalon

This comment has been minimized.

Copy link
Author

commented Apr 18, 2019

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

@alonalon alonalon force-pushed the alonalon:use-insertBefore branch from 7a7811b to db5089f Apr 18, 2019

@alonalon alonalon force-pushed the alonalon:use-insertBefore branch from db5089f to 8d38021 Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.