From e273ed145ac7a90f04fef994be516df2fb80a598 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 9 Dec 2023 13:31:04 -0500 Subject: [PATCH] [AssetMapper] Adding note about importmap block --- frontend/asset_mapper.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/asset_mapper.rst b/frontend/asset_mapper.rst index 70db9265226..42179fae32d 100644 --- a/frontend/asset_mapper.rst +++ b/frontend/asset_mapper.rst @@ -1035,7 +1035,11 @@ both ``app`` and ``checkout``: .. code-block:: twig {# templates/products/checkout.html.twig #} - {% block javascripts %} + {# + Override an "importmap" block in base.html.twig. + If you don't have this, add it around the {{ importmap('app') }} call. + #} + {% block importmap %} {# do NOT call parent() #} {{ importmap('app', 'checkout') }} @@ -1044,7 +1048,7 @@ both ``app`` and ``checkout``: By passing both ``app`` and ``checkout``, the ``importmap()`` function will output the ``importmap`` and also add a ``