Skip to content

Possible breaking change in package exports in v9.0.13 #937

@markerikson

Description

@markerikson

🐛 Bug Report

We just had a user file a Redux Toolkit bug report saying that as of Immer v9.0.13, RTK fails to initialize correctly, with a classic Object(...) is not a function error message

reduxjs/redux-toolkit#2315

image

Looking at the changes in v9.0.12...v9.0.13 , I see that there was a recent PR changing how Immer does its exports:

#921

This seems like a likely candidate for causing this kind of problem.

Note that this change was not called out in the 9.0.13 release notes, and also seems like it's a much bigger change than a "patch"-level release. (FWIW I've been advised that changes to exports in package.json probably justify being breaking majors.)

Link to repro

Don't have a repro yet - the end user just reported this a few minutes ago.

Observed behavior

It looks like Immer's exports have potentially changed, depending on the build/run environment. (Don't know details on the end user's environment yet).

Expected behavior

Immer's imports load cleanly.

Environment

We only accept bug reports against the latest Immer version.

  • Immer version:
  • I filed this report against the latest version of Immer

Rest of user environment is unknown, have asked for more details.

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