Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[AssetMapper] Asset Mapper fail after deleting "assets" folder #53669

Copy link
Copy link
Closed
@Xbirdfr

Description

@Xbirdfr
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.