-
Notifications
You must be signed in to change notification settings - Fork 994
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): update React to latest canary 19.x (#10482)
- Loading branch information
Showing
38 changed files
with
397 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/react/hooks/internal/useRenderGuard.js b/react/hooks/internal/useRenderGuard.js | ||
index 15551e6e2de4dcc585e9426f80c67cb136ecd2a7..181e74a378c59779e83b698cb1923602cf845813 100644 | ||
--- a/react/hooks/internal/useRenderGuard.js | ||
+++ b/react/hooks/internal/useRenderGuard.js | ||
@@ -1,7 +1,9 @@ | ||
-import * as React from "rehackt"; | ||
+import React from "rehackt"; | ||
function getRenderDispatcher() { | ||
- var _a, _b; | ||
- return (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentDispatcher) === null || _b === void 0 ? void 0 : _b.current; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentDispatcher || r19.ReactCurrentDispatcher; | ||
+ return _b === null || _b === void 0 ? void 0 : _b.current; | ||
} | ||
var RenderDispatcher = null; | ||
/* | ||
diff --git a/testing/internal/profile/profile.js b/testing/internal/profile/profile.js | ||
index bcb709e4a7f6a72b381632e6da6a5c7d9ab5d8f1..362dcd3e577beb62f14bdb61a72debebaaf212ff 100644 | ||
--- a/testing/internal/profile/profile.js | ||
+++ b/testing/internal/profile/profile.js | ||
@@ -276,8 +276,11 @@ export function profileHook(renderCallback) { | ||
}); | ||
} | ||
function resolveHookOwner() { | ||
- var _a, _b, _c; | ||
- return (_c = (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentOwner) === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentOwner || r19.ReactCurrentOwner; | ||
+ var _c; | ||
+ return (_c = _b === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
} | ||
export function useTrackRenders(_a) { | ||
var _b = _a === void 0 ? {} : _a, name = _b.name; |
7 changes: 7 additions & 0 deletions
7
.yarn/patches/@storybook-react-dom-shim-npm-7.6.17-789bc900f0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
diff --git a/dist/preset.js b/dist/preset.js | ||
index e136e7e4efc61bc2596c91b12bae8748cd48226f..578c2e77cd58176ad441a8fe83d384016008bbfe 100644 | ||
--- a/dist/preset.js | ||
+++ b/dist/preset.js | ||
@@ -1 +1 @@ | ||
-"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{viteFinal:()=>viteFinal,webpackFinal:()=>webpackFinal});module.exports=__toCommonJS(preset_exports);var import_package=require("react-dom/package.json"),webpackFinal=async(config,options)=>{var _a;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("0.0.0");return legacyRootApi??!isReact18?config:{...config,resolve:{...config.resolve,alias:{...(_a=config.resolve)==null?void 0:_a.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"}}}},viteFinal=async(config,options)=>{var _a,_b;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("0.0.0");if(legacyRootApi||!isReact18)return config;let alias=Array.isArray((_a=config.resolve)==null?void 0:_a.alias)?config.resolve.alias.concat({find:/^@storybook\/react-dom-shim$/,replacement:"@storybook/react-dom-shim/dist/react-18"}):{...(_b=config.resolve)==null?void 0:_b.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"};return{...config,resolve:{...config.resolve,alias}}};0&&(module.exports={viteFinal,webpackFinal}); | ||
+"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{viteFinal:()=>viteFinal,webpackFinal:()=>webpackFinal});module.exports=__toCommonJS(preset_exports);var import_package=require("react-dom/package.json"),webpackFinal=async(config,options)=>{var _a;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("19")||import_package.version.startsWith("0.0.0");return legacyRootApi??!isReact18?config:{...config,resolve:{...config.resolve,alias:{...(_a=config.resolve)==null?void 0:_a.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"}}}},viteFinal=async(config,options)=>{var _a,_b;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("0.0.0");if(legacyRootApi||!isReact18)return config;let alias=Array.isArray((_a=config.resolve)==null?void 0:_a.alias)?config.resolve.alias.concat({find:/^@storybook\/react-dom-shim$/,replacement:"@storybook/react-dom-shim/dist/react-18"}):{...(_b=config.resolve)==null?void 0:_b.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"};return{...config,resolve:{...config.resolve,alias}}};0&&(module.exports={viteFinal,webpackFinal}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
__fixtures__/test-project-rsa/.yarn/patches/@apollo-client-npm-3.9.9-15c2e13518.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/react/hooks/internal/useRenderGuard.js b/react/hooks/internal/useRenderGuard.js | ||
index 15551e6e2de4dcc585e9426f80c67cb136ecd2a7..181e74a378c59779e83b698cb1923602cf845813 100644 | ||
--- a/react/hooks/internal/useRenderGuard.js | ||
+++ b/react/hooks/internal/useRenderGuard.js | ||
@@ -1,7 +1,9 @@ | ||
-import * as React from "rehackt"; | ||
+import React from "rehackt"; | ||
function getRenderDispatcher() { | ||
- var _a, _b; | ||
- return (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentDispatcher) === null || _b === void 0 ? void 0 : _b.current; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentDispatcher || r19.ReactCurrentDispatcher; | ||
+ return _b === null || _b === void 0 ? void 0 : _b.current; | ||
} | ||
var RenderDispatcher = null; | ||
/* | ||
diff --git a/testing/internal/profile/profile.js b/testing/internal/profile/profile.js | ||
index bcb709e4a7f6a72b381632e6da6a5c7d9ab5d8f1..362dcd3e577beb62f14bdb61a72debebaaf212ff 100644 | ||
--- a/testing/internal/profile/profile.js | ||
+++ b/testing/internal/profile/profile.js | ||
@@ -276,8 +276,11 @@ export function profileHook(renderCallback) { | ||
}); | ||
} | ||
function resolveHookOwner() { | ||
- var _a, _b, _c; | ||
- return (_c = (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentOwner) === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentOwner || r19.ReactCurrentOwner; | ||
+ var _c; | ||
+ return (_c = _b === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
} | ||
export function useTrackRenders(_a) { | ||
var _b = _a === void 0 ? {} : _a, name = _b.name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...t-rsc-external-packages-and-cells/.yarn/patches/@apollo-client-npm-3.9.9-15c2e13518.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/react/hooks/internal/useRenderGuard.js b/react/hooks/internal/useRenderGuard.js | ||
index 15551e6e2de4dcc585e9426f80c67cb136ecd2a7..181e74a378c59779e83b698cb1923602cf845813 100644 | ||
--- a/react/hooks/internal/useRenderGuard.js | ||
+++ b/react/hooks/internal/useRenderGuard.js | ||
@@ -1,7 +1,9 @@ | ||
-import * as React from "rehackt"; | ||
+import React from "rehackt"; | ||
function getRenderDispatcher() { | ||
- var _a, _b; | ||
- return (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentDispatcher) === null || _b === void 0 ? void 0 : _b.current; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentDispatcher || r19.ReactCurrentDispatcher; | ||
+ return _b === null || _b === void 0 ? void 0 : _b.current; | ||
} | ||
var RenderDispatcher = null; | ||
/* | ||
diff --git a/testing/internal/profile/profile.js b/testing/internal/profile/profile.js | ||
index bcb709e4a7f6a72b381632e6da6a5c7d9ab5d8f1..362dcd3e577beb62f14bdb61a72debebaaf212ff 100644 | ||
--- a/testing/internal/profile/profile.js | ||
+++ b/testing/internal/profile/profile.js | ||
@@ -276,8 +276,11 @@ export function profileHook(renderCallback) { | ||
}); | ||
} | ||
function resolveHookOwner() { | ||
- var _a, _b, _c; | ||
- return (_c = (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentOwner) === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentOwner || r19.ReactCurrentOwner; | ||
+ var _c; | ||
+ return (_c = _b === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
} | ||
export function useTrackRenders(_a) { | ||
var _b = _a === void 0 ? {} : _a, name = _b.name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
__fixtures__/test-project/.yarn/patches/@apollo-client-npm-3.9.9-15c2e13518.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/react/hooks/internal/useRenderGuard.js b/react/hooks/internal/useRenderGuard.js | ||
index 15551e6e2de4dcc585e9426f80c67cb136ecd2a7..181e74a378c59779e83b698cb1923602cf845813 100644 | ||
--- a/react/hooks/internal/useRenderGuard.js | ||
+++ b/react/hooks/internal/useRenderGuard.js | ||
@@ -1,7 +1,9 @@ | ||
-import * as React from "rehackt"; | ||
+import React from "rehackt"; | ||
function getRenderDispatcher() { | ||
- var _a, _b; | ||
- return (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentDispatcher) === null || _b === void 0 ? void 0 : _b.current; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentDispatcher || r19.ReactCurrentDispatcher; | ||
+ return _b === null || _b === void 0 ? void 0 : _b.current; | ||
} | ||
var RenderDispatcher = null; | ||
/* | ||
diff --git a/testing/internal/profile/profile.js b/testing/internal/profile/profile.js | ||
index bcb709e4a7f6a72b381632e6da6a5c7d9ab5d8f1..362dcd3e577beb62f14bdb61a72debebaaf212ff 100644 | ||
--- a/testing/internal/profile/profile.js | ||
+++ b/testing/internal/profile/profile.js | ||
@@ -276,8 +276,11 @@ export function profileHook(renderCallback) { | ||
}); | ||
} | ||
function resolveHookOwner() { | ||
- var _a, _b, _c; | ||
- return (_c = (_b = (_a = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _a === void 0 ? void 0 : _a.ReactCurrentOwner) === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
+ var r18 = typeof React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED !== "undefined" ? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : {}; | ||
+ var r19 = typeof React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE !== "undefined" ? React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE : {}; | ||
+ var _b = r18.ReactCurrentOwner || r19.ReactCurrentOwner; | ||
+ var _c; | ||
+ return (_c = _b === null || _b === void 0 ? void 0 : _b.current) === null || _c === void 0 ? void 0 : _c.elementType; | ||
} | ||
export function useTrackRenders(_a) { | ||
var _b = _a === void 0 ? {} : _a, name = _b.name; |
7 changes: 7 additions & 0 deletions
7
...xtures__/test-project/.yarn/patches/@storybook-react-dom-shim-npm-7.6.17-789bc900f0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
diff --git a/dist/preset.js b/dist/preset.js | ||
index e136e7e4efc61bc2596c91b12bae8748cd48226f..578c2e77cd58176ad441a8fe83d384016008bbfe 100644 | ||
--- a/dist/preset.js | ||
+++ b/dist/preset.js | ||
@@ -1 +1 @@ | ||
-"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{viteFinal:()=>viteFinal,webpackFinal:()=>webpackFinal});module.exports=__toCommonJS(preset_exports);var import_package=require("react-dom/package.json"),webpackFinal=async(config,options)=>{var _a;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("0.0.0");return legacyRootApi??!isReact18?config:{...config,resolve:{...config.resolve,alias:{...(_a=config.resolve)==null?void 0:_a.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"}}}},viteFinal=async(config,options)=>{var _a,_b;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("0.0.0");if(legacyRootApi||!isReact18)return config;let alias=Array.isArray((_a=config.resolve)==null?void 0:_a.alias)?config.resolve.alias.concat({find:/^@storybook\/react-dom-shim$/,replacement:"@storybook/react-dom-shim/dist/react-18"}):{...(_b=config.resolve)==null?void 0:_b.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"};return{...config,resolve:{...config.resolve,alias}}};0&&(module.exports={viteFinal,webpackFinal}); | ||
+"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{viteFinal:()=>viteFinal,webpackFinal:()=>webpackFinal});module.exports=__toCommonJS(preset_exports);var import_package=require("react-dom/package.json"),webpackFinal=async(config,options)=>{var _a;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("19")||import_package.version.startsWith("0.0.0");return legacyRootApi??!isReact18?config:{...config,resolve:{...config.resolve,alias:{...(_a=config.resolve)==null?void 0:_a.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"}}}},viteFinal=async(config,options)=>{var _a,_b;let{legacyRootApi}=await options.presets.apply("frameworkOptions")||{},isReact18=import_package.version.startsWith("18")||import_package.version.startsWith("0.0.0");if(legacyRootApi||!isReact18)return config;let alias=Array.isArray((_a=config.resolve)==null?void 0:_a.alias)?config.resolve.alias.concat({find:/^@storybook\/react-dom-shim$/,replacement:"@storybook/react-dom-shim/dist/react-18"}):{...(_b=config.resolve)==null?void 0:_b.alias,"@storybook/react-dom-shim":"@storybook/react-dom-shim/dist/react-18"};return{...config,resolve:{...config.resolve,alias}}};0&&(module.exports={viteFinal,webpackFinal}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.