Closed
Description
Symfony version(s) affected
7.*
Description
After compiling assets, if we delete the original assets folder (I don't want it on prod), symfony crash with :
An exception has been thrown during the rendering of a template ("The asset mapper directory "assets/" does not exist.").
{% block importmap %}{{ importmap('app') }}{% endblock %}
How to reproduce
- Setup a new symfony project
- create a controller to display a page
- compile assets
- check your application (it's works)
- delete the assets folder
- check your application (it's don't work anymore)
symfony new --webapp assetmappertest .
symfony console make:controller home
symfony console assets:install public
symfony console importmap:install
symfony console asset-map:compile
Possible Solution
No response
Additional Context
No response