Skip to content

Commit b8f15f5

Browse files
committed
minor #19618 [AssetMapper] Adding info about deleting compiled assets (ThomasLandauer)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [AssetMapper] Adding info about deleting compiled assets Page: https://symfony.com/doc/6.4/frontend/asset_mapper.html#serving-assets-in-dev-vs-prod First: I'm not sure if this is really true for any (local server) configuration - I took the info from `asset-map:compile`s warning message (which I'm trying to improve in symfony/symfony#54106 BTW) The message I'm trying to get across: I've you're doing this on your dev machine (as part of the deploy process), you should set up a process that deletes those files afterwards! Maybe this should be repeated at https://symfony.com/doc/6.4/frontend/asset_mapper.html#deploying-with-the-assetmapper-component again? Or should those two headings even be merged? Commits ------- 6bffd60 [AssetMapper] Adding info about deleting compiled assets
2 parents 7ff75ed + 6bffd60 commit b8f15f5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

frontend/asset_mapper.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Serving Assets in dev vs prod
8181
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8282

8383
In the ``dev`` environment, the URL ``/assets/images/duck-3c16d9220694c0e56d8648f25e6035e9.png``
84-
is handled and returned by your Symfony app.
84+
is handled and returned by your Symfony app - but only if ``public/assets/`` is empty (see below).
8585

8686
For the ``prod`` environment, before deploy, you should run:
8787

@@ -93,6 +93,11 @@ This will physically copy all the files from your mapped directories to
9393
``public/assets/`` so that they're served directly by your web server.
9494
See :ref:`Deployment <asset-mapper-deployment>` for more details.
9595

96+
.. caution::
97+
98+
If you compiled your assets on your development machine, you need to delete them again,
99+
in order to make Symfony serve the current versions from ``assets/`` again.
100+
96101
.. tip::
97102

98103
If you need to copy the compiled assets to a different location (e.g. upload

0 commit comments

Comments
 (0)