Skip to content

Commit d1dc850

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: Minor tweak Adding `importmap_polyfill` (second attempt)
2 parents b0835b0 + eb12a3c commit d1dc850

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

frontend/asset_mapper.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ Preloading and Initializing "app.js"
289289
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290290

291291
In addition to the importmap, the ``{{ importmap() }}`` Twig function also renders
292-
an `ES module shim`_ and a few other things, like a set of "preloads":
292+
an `ES module shim`_ (see the :ref:`config-importmap-polyfill <polyfill config>`) and
293+
a few other things, like a set of "preloads":
293294

294295
.. code-block:: html
295296

@@ -1027,6 +1028,21 @@ This is a list of glob patterns that will be excluded from the asset map:
10271028
You can use the ``debug:asset-map`` command to double-check that the files
10281029
you expect are being included in the asset map.
10291030

1031+
.. _config-importmap-polyfill:
1032+
1033+
``framework.asset_mapper.importmap_polyfill``
1034+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1035+
1036+
Configure the polyfill for older browsers. Default is `ES module shim`_. You can pass
1037+
any URL to be included, or ``false`` to disable the polyfill.
1038+
1039+
.. code-block:: yaml
1040+
1041+
framework:
1042+
asset_mapper:
1043+
importmap_polyfill: false # disable the shim ...
1044+
# importmap_polyfill: 'https://...' # ... or pass some custom URL
1045+
10301046
``framework.asset_mapper.importmap_script_attributes``
10311047
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10321048

0 commit comments

Comments
 (0)