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
Should i install recoil as a dev Dependency
Should i install @headlessui/react as a dev Dependency
?
3 Replies
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
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?
If it is needed in the runtime of the app ( after transpiling from typescript ) then its not a dev dependency