-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
webpack-cli@4 installs 4x number of deps compared to v3 (including entire babel toolchain) #1916
Comments
This was previously brought to the webpack team's attention in the v4 beta feedback: #1222 (comment), #717 (comment) |
Yes, it is on top issues for [email protected] |
@webpack/cli-team what about if we will install some packages inside generator package? It reduces side very well |
From #717 (comment):
@evilebottnawi I appreciate your effort but it's less about the install size and more about the number of installed deps, and the effects on the rest of the dependency tree. For example, jscodeshift includes almost all Babel 7 packages. When Babel 8 is released, this will cause an explosion of deps duplication in any project that uses it. If webpack itself has improved significantly in this regard: v5 has far fewer deps than v4 did. But As an aside, I don't quite understand why you want the init functionality as part of the CLI package to begin with. Init is only used once at project generation time and npm/yarn already have built-in init functionality. You could release a package like |
@billyjanitsch Thanks for feedback
We want to avoid this. I think we should move out init/generator packages from webpack-cli, and install necessary deps on first run (first command run, so if you never run |
Simple solution is to let the |
Yes let's remove |
@anshumanv P.S. |
No problem, no pointing fingers, the reason to ask you is you have more context on it than me 😄 |
init is not installed by default, so less deps, some deps were removed, we will continue to reduce our deps |
Describe the bug
Not really a bug, but an observation.
I have a typescript-based project that uses
webpack@4
andwebpack@3
. When upgrading towebpack-cli@4
(alongsidewebpack@5
), I've noticed a TON of new dependencies. More than v3. More than webpack itself.Most of those come from cli-related packages installing
jscodeshift
to every consumer.What is the current behavior?
webpack-cli@4
installs 668 dependencies.In comparison,
webpack-cli@3
installs 185 dependencies,webpack@5
itself installs 121 dependencies.To Reproduce
Create a new project and install the new
webpack-cli
version.Expected behavior
Be light? Avoid installing 600+ extra dependencies for those who just want to execute
webpack
via cli.Additional context
One might consider that to be "expected behavior", but I look at it as regression.
@sokra @evilebottnawi
webpack@5
decreased the number of dependencies vastly by dropping all thosenode@6
pinned versions. The cli did exactly the opposite. :(The text was updated successfully, but these errors were encountered: