File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,35 @@ You can update your third-party packages to their current versions by running:
301
301
$ php bin/console importmap:update bootstrap lodash
302
302
$ php bin/console importmap:outdated bootstrap lodash
303
303
304
+ Removing Packages from importmap
305
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306
+
307
+ If you need to remove a JavaScript package that was previously added to your ``importmap.php `` file, you can use the ``importmap:remove `` command.
308
+
309
+ .. code-block :: terminal
310
+
311
+ $ php bin/console importmap:remove <package>
312
+
313
+ For example, to remove the ``lodash `` package from your importmap:
314
+
315
+ .. code-block :: terminal
316
+
317
+ $ php bin/console importmap:remove lodash
318
+
319
+ This will update your ``importmap.php `` file and remove the specified package (and any dependencies added along with it).
320
+ After running this command, it is recommended to also run:
321
+
322
+ .. code-block :: terminal
323
+
324
+ $ php bin/console importmap:install
325
+
326
+ This ensures your ``assets/vendor/ `` directory is in sync with the updated importmap configuration.
327
+
328
+ .. tip ::
329
+
330
+ Removing a package from the importmap does not automatically remove any references to it in your JavaScript files.
331
+ Make sure to update your code to remove any ``import `` statements that reference the removed package.
332
+
304
333
How does the importmap Work?
305
334
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306
335
You can’t perform that action at this time.
0 commit comments