Skip to content

"error.stack;" expression removed by tree-shaker, breaks bindings #3974

@mildsunrise

Description

@mildsunrise
  • Rollup Version: 2.39.1
  • Operating System (or Browser): Node
  • Node Version (if applicable):
  • Link to reproduction

Expected Behavior

The dummy.stack; line is not removed.

Actual Behavior

The dummy.stack; line is removed.

Accessing stack is necessary for the prepareStackTrace function to be called. Removing it breaks the bindings package. (I'm not sure that the tree-shaker can be smart enough to detect the side-effect here, but the documentation asked to file an issue, and I didn't find an existing one, so I did)

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