Is it possible to load icons as a dev dependency instead of a regular dependency?
See original GitHub issueHappy 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:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.