what are the factors to be considered in other to install an npm package as a dev Dependency

Because going around the internet everyone just runs
npm i package_name
npm i package_name
Should i install recoil as a dev Dependency Should i install @headlessui/react as a dev Dependency ?
3 Replies
Matvey
Matvey2y ago
dev dependency is a dependency that isn't necessary to run the compiled app and only used to develop and/or build the app. Typical examples of a dev dependency are a linter, a build tool, or @types/* packages. @headlessui/react and recoil are not dev dependencies
Lopen
LopenOP2y ago
But when the use use laravel breeze to init a react app @headlessui/react is installed as a dev Dependency So are you saying the creators or laravel and headless ui are wrong?
Dosha
Dosha2y ago
If it is needed in the runtime of the app ( after transpiling from typescript ) then its not a dev dependency
Want results from more Discord servers?
Add your server