You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 3 has an undocumented breaking change, that it no longer works with React v17, I believe. Upon updating from @ladle/react from 2.15.0 to 3.2.1 in a repository using React 17, I immediately got an error:
Failed to resolve import "react-dom/client" from "../node_modules/@ladle/react/typings-for-build/app/src/index.js?v=4ad74726". Does the file exist?
10:13:37 [vite] Internal server error: Failed to resolve import "react-dom/client" from "../node_modules/@ladle/react/typings-for-build/app/src/index.js?v=4ad74726". Does the file exist?
Plugin: vite:import-analysis
File: /Users/wmaj/Projekty/Rewardo/packages/node_modules/@ladle/react/typings-for-build/app/src/index.js?v=4ad74726:2:34
1 | import { jsx as _jsx } from "react/jsx-runtime";
2 | import * as ReactDOMClient from "react-dom/client";
| ^
3 | import App from "./app";
4 | const container = document.getElementById("ladle-root");
at formatError (/packages/node_modules/vite/dist/node/chunks/dep-df561101.js:43993:46)
at TransformContext.error (/packages/node_modules/vite/dist/node/chunks/dep-df561101.js:43989:19)
at normalizeUrl (/packages/node_modules/vite/dist/node/chunks/dep-df561101.js:41801:33)
at async /packages/node_modules/vite/dist/node/chunks/dep-df561101.js:41945:47
at async Promise.all (index 1)
at async TransformContext.transform (/packages/node_modules/vite/dist/node/chunks/dep-df561101.js:41870:13)
at async Object.transform (/packages/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:30)
at async loadAndTransform (/packages/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29)
at async viteTransformMiddleware (/packages/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)
Suggestions:
Document the breaking change
Properly set react and react-dom peerDependencies
The text was updated successfully, but these errors were encountered:
tajo
changed the title
Version 3 has an undocumented breaking change
Version 3 supports only React 18+, it's an undocumented breaking change
Oct 3, 2023
Describe the bug
Version 3 has an undocumented breaking change, that it no longer works with React v17, I believe. Upon updating from @ladle/react from 2.15.0 to 3.2.1 in a repository using React 17, I immediately got an error:
Suggestions:
The text was updated successfully, but these errors were encountered: