Skip to content

Add support for more complex selectors for sideEffects #6074

Description

@TheLarkInn

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

What is the current behavior?
webpack searched for "sideEffects": false in package.json to perform the extra optimizations for esm modules. However if false is a string, the optimization isn't detected.

We should probably (in the case that package authors might mistake this as "false" vs false) put the wrong value in, and theres no simple way to detect (as a dev) why the 'deopt' occurs.
If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
"sideEffects": "false" in package.json works the same as "sideEffects": false

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

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

Activity

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions