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

[Feature] #199

Closed
TheLarkInn opened this issue Dec 12, 2017 · 4 comments
Closed

[Feature] #199

TheLarkInn opened this issue Dec 12, 2017 · 4 comments

Comments

@TheLarkInn
Copy link
Member

TheLarkInn commented Dec 12, 2017

Do you want to request a feature or report a bug?
Feature
What is the current behavior?
This package is installed using npm
If the current behavior is a bug, please provide the steps to reproduce.

If this is a feature request, what is motivation or use case for changing the behavior?
Since now this is a dependency of webpack/webpack, we should probably also move this over to yarn as well. Initial testing shows trying to link webpack/webpack locally wasn't working to friendly with webpack-cli.

webpack-cli@latest

@billyjanitsch
Copy link
Member

billyjanitsch commented Dec 12, 2017

@TheLarkInn @ev1stensberg @sokra sorry if this has been discussed elsewhere (I searched and didn't find anything), but why was webpack-cli added as a dependency to webpack?

The standard for separate CLI packages seems to be the other way around: the CLI depends on the node API. For example, babel-cli depends on babel-core (but not vice-versa), postcss-cli depends on postcss, etc.

If it's simply because you want installing the webpack package to give you the CLI, then why not move the CLI to the webpack npm namespace and move the rest to something like webpack-core (depended on by the former) for v4?

It seems odd for webpack to depend on webpack-cli and webpack-cli to depend on webpack, especially because it causes linking/versioning issues like this.

@evenstensberg
Copy link
Member

#202 #203 , @billyjanitsch yep, you're right 👍

@billyjanitsch
Copy link
Member

@ev1stensberg I don't think #202 is quite right.

I'm suggesting that webpack-cli should depend on webpack, but webpack should not depend on webpack-cli. This is how other separate CLI packages work, e.g. Babel and postcss. If you think about the dependency hierarchy logically, this makes sense: the CLI requires (a specific version range of) the node API to function, but not vice versa.

If you want npm install webpack to give you the CLI, then one option is for the node API (what is now webpack) to be published as webpack-core and the CLI as webpack.

@evenstensberg
Copy link
Member

@billyjanitsch We're gonna make the CLI a peerdep in webpack before releasing

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

No branches or pull requests

3 participants