Skip to content

tree shaking is enabled in development mode #7094

@xiaoxiaojx

Description

@xiaoxiaojx

Bug report

It is mentioned in the documentation that one of the conditions for tree shaking to be enabled is mode: production.

But I found that the development mode code disappeared. I never believed that it was caused by tree shaking, because the document was very sure that it would not be enabled, 😢 until I found this problem by debugging.

This is easy to reproduce, such as this warehouse xiaoxiaojx/webpack-issuer

What is the current behavior?
tree shaking is enabled in development mode

What is the expected behavior?
Modify the webpack documentation or fix the development mode bug

If it is confirmed to be a bug, I can contribute this pr

Other relevant information:
webpack version: 5.88.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions