@@ -200,9 +200,9 @@ this can be done by importing its full URL, like from a CDN:
200200
201201 import { Alert } from ' https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/+esm' ;
202202
203- But yikes! Needing to include that URL is a pain! Instead, we can add
204- this to our "importmap" via the ``importmap:require `` command. This command can
205- be used to download any `npm package `_:
203+ But yikes! Needing to include that URL is a pain! Instead, we can add this package
204+ to our "importmap" via the ``importmap:require `` command. This command can be used
205+ to add any `npm package `_:
206206
207207.. code-block :: terminal
208208
@@ -219,35 +219,34 @@ This adds the ``bootstrap`` package to your ``importmap.php`` file::
219219 ],
220220 ];
221221
222- Now you can import the ``bootstrap `` package like normal:
222+ .. note ::
223+
224+ Sometimes, a package - like ``bootstrap `` - will have one or more dependencies,
225+ such as ``@popperjs/core ``. The ``importmap:require `` command will add both the
226+ main package *and * its dependencies.
227+
228+ After adding/updating the package in your ``importmap.php `` file, all new packages
229+ will be downloaded into an ``assets/vendor/ `` directory.
230+
231+ Now you can import the ``bootstrap `` package like usual:
223232
224233.. code-block :: javascript
225234
226235 import { Alert } from ' bootstrap' ;
227236 // ...
228237
229- If you want to download the package locally, use the ``--download `` option:
238+ It's recommended to ignore the ``assets/vendor/ `` directory and not commit it to
239+ your repository. Therefore, you'll need to run the ``php bin/console importmap:install ``
240+ command to download the files on other computers if some files are missing:
230241
231242.. code-block :: terminal
232243
233- $ php bin/console importmap:require bootstrap --download
234-
235- This will download the package into an ``assets/vendor/ `` directory and update
236- the ``importmap.php `` file to point to it. It's recommended to ignore this
237- directory and not commit it to your repository. Therefore, you'll need to run the
238- ``php bin/console importmap:install `` command to download the files on other
239- computers if some files are missing.
244+ $ php bin/console importmap:install
240245
241246 .. versionadded :: 6.4
242247
243248 The ``importmap:install `` command was introduced in Symfony 6.4.
244249
245- .. note ::
246-
247- Sometimes, a package - like ``bootstrap `` - will have one or more dependencies,
248- such as ``@popperjs/core ``. The ``download `` option will download both the main
249- package *and * its dependencies.
250-
251250You can check for available updates for your third-party packages by running:
252251
253252.. code-block :: terminal
0 commit comments