Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to load icons as a dev dependency instead of a regular dependency?

See original GitHub issue

Happy new year 😊

I was checking my node_modules size and I realized that this module has a 97 MB dependency on the material design icons.

I checked the docs for icons-mdi, which give the example using --save-dev.

Why does this module include the icons as a regular dependency instead of as a dev dependency?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

ptmkennycommented, Jan 8, 2022

In case it’s helpful to anyone coming to this issue from Google, here’s the one-liner I used to delete all the unnecessary icons, freeing up about 88 MB of space:

find ../node_modules/@iconify/icons-mdi -maxdepth 1 ! -name "play-circle*" ! -name "pause-circle*" ! -name "skip-previous*" ! -name "skip-next*" ! -name "fast-forward*" ! -name "rewind*" ! -name "volume-high*" ! -name "volume-mute" ! -name "repeat*" -delete

ptmkennycommented, Jan 7, 2022

Ok, that’s what I didn’t understand. If the library has to be installed, I guess I’ll write a bash script to delete the unnecessary icons.

Thanks for the response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dependencies vs devDependencies - Medium
Dependencies should contain libs and framewors your app is built on, such as Vue, React, Angular, Express, JQuery and etc. You will agree...
Read more >
why are the icons a dev dependency? - vue.js - Stack Overflow
The -D flag indicates that the icons should be installed as a devDependency , but I don't understand why given that the icons...
Read more >
Is this a dependency or devDependency? - With Blue Ink
The real answer is it depends. The choice of where to put each module depends not only on the module itself, but on...
Read more >
When is a package a dependency or devDependency - Reddit
Yes if you have webapp that is bundled to html,js files for browser such as create-react-app, technically every package is devdependency because ...
Read more >
Adding dependencies to a package.json file - npm Docs
To add dependencies and devDependencies to a package.json file from the command line, you can install them in the root directory of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found