Closed
Description
Currently, the bridge generates a virtual module which uses import()
with the webpackMode
comment to make them eager or lazy.
But the way this @symfony/controllers
module is consumed in the main entrypoint means that all the controllers are loaded on all pages to be registered. This makes the lazy-loading useless as you would load all chunks on all pages.
I discovered https://github.com/danieldiekmeier/stimulus-controller-resolver which allows to actually lazy-load some modules only if they are used in the page. It might make sense to use that.
Metadata
Metadata
Assignees
Labels
No labels