Skip to content

Avoid instanceof and remove the "node" export condition #713

Closed
@timostamm

Description

In connectrpc/connect-es#974, we override ConnectError's implementation of instanceof to avoid the dual package hazard, which allows us to remove the "node" export condition, which causes problems with some bundlers.

We need to take a similar approach here: Avoid the dual package hazard with instanceof, and remove the "node" export condition.

There are many more uses of instanceof here that in Connect-ES, and we will need to take a more cautious approach, and also make sure that we do not regress on performance.

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