diff --git a/frontend/encore/legacy-applications.rst b/frontend/encore/legacy-applications.rst index c22812d00b8..f333a70e3df 100644 --- a/frontend/encore/legacy-applications.rst +++ b/frontend/encore/legacy-applications.rst @@ -87,3 +87,18 @@ The ``global`` variable is a special way of setting things in the ``window`` variable. In a web context, using ``global`` and ``window`` are equivalent, except that ``window.jQuery`` won't work when using ``autoProvidejQuery()``. In other words, use ``global``. + +Additionally, be sure to set the ``script_attributes.defer`` option to ``false`` +in your ``webpack_encore.yaml`` file: + +.. code-block:: yaml + + # config/packages/webpack_encore.yaml + webpack_encore: + script_attributes: + defer: false + +This will make sure there is *not* a ``defer`` attribute on your ``script`` +tags. For more information, see `Moving