-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
[Stimulus] Fasten lazy loading + add debug lazy:loading
and lazy:loaded
#2463
base: 2.x
Are you sure you want to change the base?
Conversation
log `controller#lazy:loading` & `controller#lazy:loaded`
📊 Packages dist files size differenceThanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
|
I will try to find some time to rebuild a Symfony + Encore app, but by reading your changes it looks fine to me (feel free to reping me if necessary) |
@MatTheCat ? 👼 |
I'm testing |
Well... I've just realized, but to use Stimulus in a Symfony App with Webpack Encore, we use the https://github.com/symfony/stimulus-bridge ... which is not in this repository (and so not modified by this PR) 😅 |
Well.... let me tell you i have no intention of coding in the Bridge hahaha (i'll have a look but the lazy loading is done differently if i remember correctly) |
I’ve got nothing to test then? 🤔 |
This PR..
improves the controller lazy loading by tuning algorithm (early exit, remove await, ...)
introduces two new debug events in the console to ease DX with lazy controllers
my-controller#lazy:loading
when the lazy controller is detected in the DOMmy-controller#lazy:loaded
after the file has been downloaded and importedI would really like some feedback / tests IRL (especially with Webpack i'm not used to)