Skip to content

Polyfills being treeshaked as deadcode #63

@josetapadas

Description

@josetapadas

Hello,

So there is a big discussion about how self executing functions or side effects are being shaked off when, for example, you directly import one poly fill.

Imagine the following scenario:

App A includes a component from module M.

Module M imports one of your polyfills P.

When webpack compiles A, as your module has no sideEffects in package.json, it simply thinks that P is dead code.

(A nice discussion can be followed at : webpack/webpack#6571)

What do you think of adding sideEffects to this library package.json?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions