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 is vuex loaded as a dev dependency? #98

Open
simplenotezy opened this issue Feb 6, 2020 · 3 comments
Open

Why is vuex loaded as a dev dependency? #98

simplenotezy opened this issue Feb 6, 2020 · 3 comments

Comments

@simplenotezy
Copy link
Contributor

I noticed vuex, vue-routing and more is loaded as a dev dependency. Is this on purpose, and if so, which?

@EvanAgee
Copy link
Owner

EvanAgee commented Feb 6, 2020

@simplenotezy Good question! By definition dev dependencies are only loaded during development and aren't necessary in production because all of our scripts are getting compiled into the dist directory during a production build process.

@simplenotezy
Copy link
Contributor Author

OK I see. Then in theory, "vue" and "axios" could also be loaded as a dev dependency?

@austin880625
Copy link

austin880625 commented Feb 18, 2020

dependencies and devDependencies are designed for node.js package (that is, for server side in common applications). If the application are bundled by webpack, everything are actually required and collected by webpack at the building process. And in runtime(i.e. on a browser), the bundle doesn't depend on any node.js package. So yes, things you mentioned can be dev dependencies in this case (if you weren't building bundles in production node environment).

A detailed explaination can be found here

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