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

Advice on peerDependencies vs dependencies #4

Closed
justin808 opened this issue Mar 29, 2015 · 2 comments
Closed

Advice on peerDependencies vs dependencies #4

justin808 opened this issue Mar 29, 2015 · 2 comments

Comments

@justin808
Copy link

I'm maintaining similar project: https://github.com/justin808/bootstrap-sass-loader

Wondering if other loaders should be peerDependencies or dependencies in package.json:

https://github.com/gowravshekar/bootstrap-webpack/blob/master/package.json#L18

  "dependencies": {
    "css-loader": "~0.6.3",
    "less-loader": "~0.6.2",
    "style-loader": "~0.6.0"
  },
  "peerDependencies": {
    "bootstrap": ">=3.0.2"
  }
@bebraw
Copy link

bebraw commented Apr 7, 2015

I think peer dependencies are the way to go. I've used that for React components. The problem with direct dependencies is that you can easily end up with multiple different versions of the same dependency in your bundle. Peer dependencies avoid that and it's up to user to pick the right version to use. It's a good idea to keep peer dependencies pretty loose (up to next major version or something).

@gowravshekar
Copy link
Owner

Added loaders in peerDependencies.

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