File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -1031,15 +1031,31 @@ you expect are being included in the asset map.
10311031``framework.asset_mapper.importmap_polyfill ``
10321032~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10331033
1034- Configure the polyfill for older browsers. Default is `ES module shim `_. You can pass
1035- any URL to be included, or ``false `` to disable the polyfill.
1034+ Configure the polyfill for older browsers. By default, the `ES module shim `_ is loaded
1035+ via a CDN. You can pass the key of an item in ``importmap.php `` or ``false `` to disable
1036+ the polyfill loading.
10361037
10371038.. code-block :: yaml
10381039
10391040 framework :
10401041 asset_mapper :
10411042 importmap_polyfill : false # disable the shim ...
1042- # importmap_polyfill: 'https://...' # ... or pass some custom URL
1043+ # importmap_polyfill: 'my_import_map' # ... or pass an importmap name
1044+
1045+ .. tip ::
1046+
1047+ You can tell the AssetMapper to load the `ES module shim `_ locally by
1048+ using the following command, without changing your configuration:
1049+
1050+ .. code-block :: terminal
1051+
1052+ $ php bin/console importmap:require es-module-shims
1053+
1054+ .. versionadded :: 6.4
1055+
1056+ Passing an importmap name in ``importmap_polyfill `` was
1057+ introduced in Symfony 6.4. Prior to this, you could pass ``false ``
1058+ or a custom URL to load the polyfill.
10431059
10441060``framework.asset_mapper.importmap_script_attributes ``
10451061~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments