From 6a38c5c02cc1efd4d455e53ac63afb66608087b6 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Wed, 7 May 2025 20:32:40 -0500 Subject: [PATCH 1/2] fix: `browser` `exports` condition (#4973) --- packages/toolkit/package.json | 40 ++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index e3618647a8..98eff88134 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -49,8 +49,14 @@ } }, "browser": { - "types": "./dist/index.d.mts", - "default": "./dist/redux-toolkit.browser.mjs" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/redux-toolkit.browser.mjs" + }, + "default": { + "types": "./dist/index.d.ts", + "default": "./dist/cjs/index.js" + } }, "import": { "types": "./dist/index.d.mts", @@ -81,8 +87,14 @@ } }, "browser": { - "types": "./dist/react/index.d.mts", - "default": "./dist/react/redux-toolkit-react.browser.mjs" + "import": { + "types": "./dist/react/index.d.mts", + "default": "./dist/react/redux-toolkit-react.browser.mjs" + }, + "default": { + "types": "./dist/react/index.d.ts", + "default": "./dist/react/cjs/index.js" + } }, "import": { "types": "./dist/react/index.d.mts", @@ -113,8 +125,14 @@ } }, "browser": { - "types": "./dist/query/index.d.mts", - "default": "./dist/query/rtk-query.browser.mjs" + "import": { + "types": "./dist/query/index.d.mts", + "default": "./dist/query/rtk-query.browser.mjs" + }, + "default": { + "types": "./dist/query/index.d.ts", + "default": "./dist/query/cjs/index.js" + } }, "import": { "types": "./dist/query/index.d.mts", @@ -145,8 +163,14 @@ } }, "browser": { - "types": "./dist/query/react/index.d.mts", - "default": "./dist/query/react/rtk-query-react.browser.mjs" + "import": { + "types": "./dist/query/react/index.d.mts", + "default": "./dist/query/react/rtk-query-react.browser.mjs" + }, + "default": { + "types": "./dist/query/react/index.d.ts", + "default": "./dist/query/react/cjs/index.js" + } }, "import": { "types": "./dist/query/react/index.d.mts", From cb089e6c834ff72a5457875e0f5be10a742ee239 Mon Sep 17 00:00:00 2001 From: Mark Erikson Date: Wed, 7 May 2025 21:37:47 -0400 Subject: [PATCH 2/2] Release 2.8.1 --- packages/toolkit/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 98eff88134..ec2d58ff15 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@reduxjs/toolkit", - "version": "2.8.0", + "version": "2.8.1", "description": "The official, opinionated, batteries-included toolset for efficient Redux development", "author": "Mark Erikson ", "license": "MIT",