Skip to content

redux-toolkit.legacy-esm.js not actually compatible with Webpack 4 due to optional chaining #4282

Closed
@Zacqary

Description

@Zacqary

Upgrading to Redux Toolkit 2.x on a Webpack 4 repo fails due to this line:

if (cache?.has(value))

Webpack 4 doesn't support optional chaining without some additional plugins that can break many large projects. Is it possible to switch back to the pre-2.x transpiling method for the legacy build?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions