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

Best practices for depenendencies vs devDependencies #53

Open
dustingetz opened this issue Jan 22, 2016 · 3 comments
Open

Best practices for depenendencies vs devDependencies #53

dustingetz opened this issue Jan 22, 2016 · 3 comments

Comments

@dustingetz
Copy link

Since webpack produces an artifact that bundles all dependencies, none of the dependencies need to be available in the node environment at runtime (because there is no node environment in prod unless we are using node to serve the prod assets), so shouldn't we all be using devDependencies for everything? Is there any reason that we are not doing this or is it just a misleading convention?

@dustingetz
Copy link
Author

see http://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies

@dustingetz
Copy link
Author

see webpack/webpack#520

@whenov
Copy link

whenov commented Mar 28, 2016

IMO the following command should be run in development environment:

NODE_ENV=development npm install
NODE_ENV=production webpack

And the following in production environment, and this is necessary only if you use node.js as the backend:

NODE_ENV=production npm install

You don't need webpack in production environment.

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

2 participants