-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Replace Laravel Mix with Bud #2643
Conversation
@QWp6t I think this is almost 100% good to go. I don't think the base path is being set properly for relative css imports, but proxy/hmr/postcss/react all seem to be on their best behavior. File hashing works well, minification works well. It feels fast. I will need to also try dropping some actual production dependencies. Out-of-the-box there is no runtime/vendor bundle generated as there are no deps to bundle.
|
Just chatting with Ben about this, and wanted to reach out and see if there's anything a potential contributor could help with for this to help get it over the line. Let me know if there's anything I can do to help |
export const domReady = (onReady) => { | ||
window.requestAnimationFrame(function check() { | ||
document.body ? onReady() : window.requestAnimationFrame(check); | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const domReady = (onReady) => { | |
window.requestAnimationFrame(function check() { | |
document.body ? onReady() : window.requestAnimationFrame(check); | |
}); | |
}; | |
export const domReady = (onReady) => { | |
window.requestAnimationFrame(document.body ? onReady : domReady); | |
} |
We can check for the body immediately, right? Do we even need to do that in an animation frame the first time it’s called? I don’t know enough about (I am wrong, the falsy passed window.requestAnimationFrame
, so I could be wrong.domReady
in my suggestion loses the reference to onReady
.)
As an aside, I think we should change the name of this function to bodyIsReady
(alternatively prefixed with my
), since it kind of breaks the mold of DOM readiness functions (particularly by going outside of the definition of DOMContentLoaded
).
Scripts were accidentally removed in PR roots#2643.
Scripts were accidentally removed in PR #2643.
No description provided.