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