mirror of
https://github.com/symfony/stimulus-bundle.git
synced 2026-03-24 01:12:07 +01:00
v2.23.0
lazy:loading and lazy:loaded (smnandre)
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[Stimulus] Fasten lazy loading + add debug `lazy:loading` and `lazy:loaded`
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| Issues | Fix #...
| License | MIT
This PR..
1. improves the controller **lazy loading** by tuning algorithm (early exit, remove await, ...)
2. 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 DOM
* `my-controller#lazy:loaded` after the file has been downloaded and imported
I would really like some feedback / tests IRL (especially with Webpack i'm not used to)
Commits
-------
3b8e1ce4 [Stimulus] Fasten lazy loading + add debug `lazy:loading` and `lazy:loaded`
StimulusBundle: Symfony integration with Stimulus!
This bundle adds integration between Symfony, Stimulus and Symfony UX:
- A) Twig
stimulus_*functions & filters to add Stimulus controllers, actions & targets in your templates; - B) Integration with Symfony UX & AssetMapper;
- C) A helper service to build the Stimulus data attributes and use them in your services.
Languages
PHP
92.8%
TypeScript
7%
JavaScript
0.2%