File tree 1 file changed +17
-0
lines changed 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -120,3 +120,20 @@ Twig ``stimulus_*`` functions.
120
120
of the controller in ``package.json `` is ``slug ``. So, the full controller name for Stimulus will be
121
121
``acme--feature--slug ``, though with the ``stimulus_controller() `` function, you can use ``acme/feature/slug ``.
122
122
123
+ Each controller has a number of options in ``package.json `` file:
124
+
125
+ ================== ====================================================================================================
126
+ Option Description
127
+ ================== ====================================================================================================
128
+ enabled Whether the controller should be enabled by default.
129
+ main Path to the controller file.
130
+ fetch How controller & dependencies are included when the page loads.
131
+ Use ``eager `` (default) to make controller & dependencies included in the JavaScript that's
132
+ downloaded when the page is loaded.
133
+ Use ``lazy `` to make controller & dependencies isolated into a separate file and only downloaded
134
+ asynchronously if (and when) the data-controller HTML appears on the page.
135
+ autoimport List of files to be imported with the controller. Useful e.g. when there are several CSS styles
136
+ depending on the frontend framework used (like Bootstrap 4 or 5, Tailwind CSS...).
137
+ The value must be an object with files as keys, and a boolean as value for each file to set
138
+ whether the file should be imported.
139
+ ================== ====================================================================================================
You can’t perform that action at this time.
0 commit comments