From 25cd7ad81754b4e6aea2e5b4f140c5c4b6ca7963 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Fri, 21 Mar 2025 11:13:12 +0100 Subject: [PATCH 1/2] [AssetMapper]: Adding info that always *all* entrypoints are included in the importmap Page: https://symfony.com/doc/6.4/frontend/asset_mapper.html#page-specific-css-javascript Info is taken from https://github.com/symfony/symfony/issues/54377#issuecomment-2017315259 --- frontend/asset_mapper.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/asset_mapper.rst b/frontend/asset_mapper.rst index 061c4598bfa..e518e619f5b 100644 --- a/frontend/asset_mapper.rst +++ b/frontend/asset_mapper.rst @@ -1081,8 +1081,10 @@ loads the ``app.js`` file *and* the ``checkout.js`` file. It's important to *not* call ``parent()`` in the ``importmap`` block. Each page can only have *one* importmap, so ``importmap()`` must be called exactly once. -If, for some reason, you want to execute *only* ``checkout.js`` +If you want to execute *only* ``checkout.js`` and *not* ``app.js``, pass only ``checkout`` to ``importmap()``. +In this case, still **both** files are added to ````). Using a Content Security Policy (CSP) -------------------------------------