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 @@ -292,6 +292,33 @@ You can update your third-party packages to their current versions by running:
292292 $ php bin/console importmap:update bootstrap lodash
293293 $ php bin/console importmap:outdated bootstrap lodash
294294
295+ Removing JavaScript Packages
296+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297+
298+ If you need to remove a JavaScript package that was previously added to your
299+ ``importmap.php `` file, use the ``importmap:remove `` command. For example, to
300+ remove the ``lodash `` package:
301+
302+ .. code-block :: terminal
303+
304+ $ php bin/console importmap:remove lodash
305+
306+ This updates your ``importmap.php `` file and removes the specified package
307+ (along with any dependencies that were added with it).
308+
309+ After running this command, it's recommended to also run the following to ensure
310+ that your ``assets/vendor/ `` directory is in sync with the updated import map:
311+
312+ .. code-block :: terminal
313+
314+ $ php bin/console importmap:install
315+
316+ .. tip ::
317+
318+ Removing a package from the import map does not automatically remove any
319+ references to it in your JavaScript files. Make sure to update your code and
320+ remove any ``import `` statements that reference the removed package.
321+
295322How does the importmap Work?
296323~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297324
You can’t perform that action at this time.
0 commit comments