Skip to content

Commit c9b28f5

Browse files
[AssetMapper] Adding infos to be forwarded to package maintainers in case of error
Page: https://symfony.com/doc/6.4/frontend/asset_mapper.html#importing-3rd-party-javascript-packages Closes #19558
1 parent 86976e6 commit c9b28f5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

frontend/asset_mapper.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ to add any `npm package`_:
188188
189189
$ php bin/console importmap:require bootstrap
190190
191+
.. note::
192+
193+
If you're getting a 404 error, you can contact the package maintainer and ask them to
194+
include `"main":` and `"module":` to the package's `package.json`.
195+
191196
This adds the ``bootstrap`` package to your ``importmap.php`` file::
192197

193198
// importmap.php
@@ -207,6 +212,8 @@ This adds the ``bootstrap`` package to your ``importmap.php`` file::
207212
such as ``@popperjs/core``. The ``importmap:require`` command will add both the
208213
main package *and* its dependencies. If a package includes a main CSS file,
209214
that will also be added (see :ref:`Handling 3rd-Party CSS <asset-mapper-3rd-party-css>`).
215+
If the associated CSS file isn't added to the importmap, you can contact the package
216+
maintainer and ask them to include `"style":` to the package's `package.json`.
210217

211218
Now you can import the ``bootstrap`` package like usual:
212219

0 commit comments

Comments
 (0)