Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why use --save-dev flag to install video.js? #126

Open
guitartsword opened this issue Mar 3, 2021 · 2 comments
Open

Why use --save-dev flag to install video.js? #126

guitartsword opened this issue Mar 3, 2021 · 2 comments

Comments

@guitartsword
Copy link

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?

image

@gkatsev
Copy link
Member

gkatsev commented Mar 4, 2021

In the other repo would work ok as well.

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.

@thomasneger
Copy link

Hi! I just asked myself the same question.

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.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants