8000 minor #18554 Adding `importmap_polyfill` (second attempt) (ThomasLand… · symfony/symfony-docs@181dc58 · GitHub
[go: up one dir, main page]

Skip to content

Commit 181dc58

Browse files
committed
minor #18554 Adding importmap_polyfill (second attempt) (ThomasLandauer)
This PR was merged into the 6.3 branch. Discussion ---------- Adding `importmap_polyfill` (second attempt) As requested at #18537 (comment) Closes #18537 Commits ------- f95a507 Adding `importmap_polyfill` (second attempt)
2 parents 65541d1 + f95a507 commit 181dc58

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)
0