Skip to content

webpack-cli@4 installs 4x number of deps compared to v3 (including entire babel toolchain) #1916

@AviVahl

Description

@AviVahl

Describe the bug

Not really a bug, but an observation.
I have a typescript-based project that uses webpack@4 and webpack@3. When upgrading to webpack-cli@4 (alongside webpack@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 those node@6 pinned versions. The cli did exactly the opposite. :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions