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