Skip to content

Webpack adds the nodejs shims when they actually not necessary. #4473

Closed

Description

@mightyaleksey

Do you want to request a feature or report a bug?

I think it's a bug (not sure).

What is the current behavior?

Webpack includes in the resulting bundle nodejs shims for buffer, process and path modules when they are actually not necessary. It adds about 30kb in the minified bundle.
I faced this issue after updating version of webpack from 1.x to 2.x.

If the current behavior is a bug, please provide the steps to reproduce.

I made a small example, which illustrates the problem: https://github.com/sullenor/webpack-shims and attached the stats files:

What is the expected behavior?

Expected the resulting bundle to have a smaller size: ~3-5kb, not 33kb (minimized).

If this is a feature request, what is motivation or use case for changing the behavior?

No

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

macOs Sierra 10.12.3, nodejs v7.7.2, webpack v2.2.1,
https://github.com/sullenor/webpack-shims/blob/master/package.json#L3-L6

Activity

  1. sokra commented on Mar 16, 2017

    @sokra
    Member

    It looks like this issue is not directly related to this project. We try to only keep issues directly related to this project in the issue tracker. Therefore I'm closing this issue.

    Please file the issue on webpack/style-loader.

    You can easily copy your text if you click on "edit" on this issue. Also make sure to follow the issue requirements of the target project when pasting this issue.

  2. mightyaleksey commented on Mar 16, 2017

    @mightyaleksey
    Author

    ok, thanks

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions