Skip to content

[5.107.1 regression] The functions exported by CommonJS through exports are wrongly marked as unused and are lost on the exports. #21178

Description

@ShenHongFei

Have you used AI?

No

Bug Description

source

Image

output

Image

before version 5.107.1, for example 5.107.0

Image

related pr

maybe #21003

Link to Minimal Reproduction and step to reproduce

packing npm package ali-oss

Expected Behavior

run normally

Actual Behavior

TypeError: this.buildCanonicalizedResource is not a function

Environment

Both webpack 5.107.1 and 5.107.2 have this problem.

Is this a regression?

Yes (please specify version below)

Last Working Version

5.107.0

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions