Hugo Alliaume 254f4e05cb feature #2463 [Stimulus] Fasten lazy loading + add debug 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`
2025-01-16 22:55:09 +01:00
2024-06-25 11:04:53 +02:00
2025-01-08 19:59:51 +01:00
2024-04-18 22:02:15 +02:00
2023-10-14 22:56:02 +02:00

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.

Read the documentation

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:41:02.528Z
Readme MIT 340 KiB
Languages
PHP 92.8%
TypeScript 7%
JavaScript 0.2%