@@ -57,7 +57,7 @@ Remove the following line in the mentioned file: it's not needed anymore:
57
57
58
58
The bridge works by reading a ` controllers.json ` file that is automatically
59
59
updated by Symfony Flex whenever you download a UX-powered package. For
60
- example, after running ` composer require symfony/ux-dropzone.js ` , it will
60
+ example, after running ` composer require symfony/ux-dropzone ` , it will
61
61
look like this:
62
62
63
63
``` json
@@ -81,15 +81,17 @@ Each item under `controllers` will cause a Stimulus controller to be
81
81
registered with a specific name - in this case the controller would
82
82
be called ` symfony--ux-dropzone--dropzone ` (the ` / ` becomes ` -- ` ).
83
83
84
- By default, the new controller will be always be included in your
84
+ By default, the new controller will always be included in your
85
85
JavaScript package. You can control that with the ` webpackMode ` option,
86
86
ordered from least to most lazy:
87
87
88
- * ` webpackMode: 'eager' ` : include in JavaScript that is downloaded on page load
89
- * ` webpackMode: 'lazy' ` : isolate into a separate JavaScript file, but immediately
90
- download this after the page is loaded.
91
- * ` webpackMode: 'controller-lazy' ` : wait until this controller HTML is
92
- first included on the page and * then* download the controller and execute it.
88
+ * ` webpackMode: 'eager' ` : controller & dependencies are included in the JavaScript
89
+ that's downloaded when the page is loaded.
90
+ * ` webpackMode: 'lazy' ` : controller & dependencies are isolated into a separate
91
+ JavaScript file, but immediately downloaded asynchronously after the page is loaded.
92
+ * ` webpackMode: 'controller-lazy' ` : controller & dependencies are isolated into a
93
+ separate file and only downloaded asynchronously if (and when) the ` data-controller `
94
+ HTML appears on the page.
93
95
94
96
## Run tests
95
97
0 commit comments