Skip to content

[AssetMapper] Give better error message if importmap_polyfill is set to true #53725

@ThomasLandauer

Description

@ThomasLandauer

Symfony version(s) affected

7.0.2

Description

When setting the importmap_polyfill setting to true (instead of an entry point's name), the resulting error message reads:

An exception has been thrown during the rendering of a template ("The JavaScript module polyfill was not found in your import map. Either disable the polyfill or run "php bin/console importmap:require "1"" to install it.").

Now, when actually doing php bin/console importmap:require 1, there is indeed something added called 1.

It would be nice if the error message could be improved for this case.

How to reproduce

See above.

Possible Solution

If you think that it's not worth it, just close here :-)
The importmap_polyfill setting is properly documented at https://symfony.com/doc/current/frontend/asset_mapper.html#framework-asset-mapper-importmap-polyfill

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