8000 [AssetMapper] Asset Mapper fail after deleting "assets" folder · Issue #53669 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[AssetMapper] Asset Mapper fail after deleting "assets" folder #53669
Closed
@Xbirdfr

Description

@Xbirdfr

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0