File tree 1 file changed +19
-3
lines changed
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.
1031
1031
``framework.asset_mapper.importmap_polyfill ``
1032
1032
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1033
1033
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.
1036
1037
1037
1038
.. code-block :: yaml
1038
1039
1039
1040
framework :
1040
1041
asset_mapper :
1041
1042
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.
1043
1059
1044
1060
``framework.asset_mapper.importmap_script_attributes ``
1045
1061
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments