Skip to content

Commit 25cd7ad

Browse files
[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 symfony/symfony#54377 (comment)
1 parent 0772b75 commit 25cd7ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/asset_mapper.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,10 @@ loads the ``app.js`` file *and* the ``checkout.js`` file. It's important
10811081
to *not* call ``parent()`` in the ``importmap`` block. Each page can only
10821082
have *one* importmap, so ``importmap()`` must be called exactly once.
10831083

1084-
If, for some reason, you want to execute *only* ``checkout.js``
1084+
If you want to execute *only* ``checkout.js``
10851085
and *not* ``app.js``, pass only ``checkout`` to ``importmap()``.
1086+
In this case, still **both** files are added to ``<script type="importmap">``,
1087+
but only ``checkout.js`` is executed (via ``<link rel="modulepreload">``).
10861088

10871089
Using a Content Security Policy (CSP)
10881090
-------------------------------------

0 commit comments

Comments
 (0)