You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation doesn't explain why the --save-dev flag is used instead of normal install. If this is going to be on the final project output then it should be in the dependencies and not on deveDependencies or there is some reason you recommend this?
The text was updated successfully, but these errors were encountered:
Either way works, I think the idea behind --save-dev is that you should be using a bundler to produce a file that you host on your site. It's definitely a bit of a grey area.
In my team, we publish a library of components, one of them being a Player component which wraps video.js.
I was doing some dependencies checks and noticed the dev before me put video.js in the devDependencies. I looked it up and ended in the official documentation.
I will definitely agree with @gkatsev here that it is a bit of a grey area. For instance, in my case, our library is bundled with rollup.js and our apps built with webpack. It does not seem to matter whether I put video.js in dependencies or devDependencies as in both cases our applications still works fine. The final bundle size remains the same too.
Since it doesn't seem to matter. I think for clarity, I'll move the video.js into the dependencies array to be inline with the NPM docs
"dependencies": Packages required by your application in production.
"devDependencies": Packages that are only needed for local development and testing.
The documentation doesn't explain why the --save-dev flag is used instead of normal install. If this is going to be on the final project output then it should be in the dependencies and not on deveDependencies or there is some reason you recommend this?
The text was updated successfully, but these errors were encountered: