-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Consider providing a small inline CLI #6628
Comments
Yeah, agreed. A tiny CLI that can literally just build a project would cover most of the bases. |
This should be moved to https://github.com/webpack/webpack-cli repo |
I don't thing this is good idea. @billyjanitsch why |
What is your expected with tiny cli? You could have a simple cli use node. such as vim webpack.js
and run with
|
@montogeek no, this is specifically a request for webpack to include this outside of webpack-cli. @evilebottnawi I wasn't saying that it makes my build huge, just that it's a huge package: 66mb of dependencies, including 2 transient dependencies on deprecated packages, and a transient dependency with a postinstall script, resulting in a slow install time. That's a lot of weight to introduce to every user's dev environment when most web projects already use webpack-dev-server or webpack-serve for development and just need an extremely simple CLI to tell webpack to generate their production build, like @bebraw said. @HillLiu I know that I can write such a CLI myself, but since it's so small, I'm asking whether it could be included in webpack so that it doesn't have to be duplicated across every project. I am happy to PR it. (Btw, webpack-cli can easily be used as a one-off tool for chores like initialization and migration without depending on it by running e.g. |
I agree with @billyjanitsch on this. Decided not to upgrade to webpack@4 just yet because installing webpack-cli installs half of the npm registry with it. A small scope cli interface for webpack compiler should be included by default. |
I tell you who else would appreciate this.. @TheLarkInn https://www.twitch.tv/videos/232732984?t=00h44m06s
🤣 |
@sokra @TheLarkInn has this received enough attention for you to consider it? |
@billyjanitsch You might like this https://www.npmjs.com/package/zeropack |
@montogeek thanks for the link but that seems to be an opinionated wrapper around webpack, including dependencies on loaders, etc. I don't want to make webpack simpler or change the way it behaves. I just want to invoke it via CLI (ideally without installing additional tooling). |
Thanks everyone, released https://github.com/webpack-contrib/webpack-command |
Do you want to request a feature or report a bug?
Feature.
If this is a feature request, what is motivation or use case for changing the behavior?
webpack-cli does a lot of neat things, but it's huge, has a huge dependency list, and I don't personally need any of its features other than a tiny CLI that takes args and passes them to a webpack compiler. It's also annoying to have to remember to install an additional dependency for each web project.
Would you consider providing an extremely minimal CLI within the webpack package itself, which simply parsed args and sent them to a webpack instance? Everyone would still be free to use webpack-cli if they want/need, but no one would be forced to install an extremely large tool just to call webpack from the command line.
The text was updated successfully, but these errors were encountered: