debug the source code of react in vscode
React 18.2.0 now only support bellow node version for development: "^12.17.0 || 13.x || 14.x || 15.x || 16.x || 17.x".
17.x is recommanded.
cd react-18.2.0 && yarn && yarn build
cd build/node_modules/react && npm link
and
cd .. && cd react-dom && npm link
npm link react react-dom
Try to delete .vite folder under node_modules and npm run dev
, then start debugging.