react-sync

Build local React changes in the bundle variants consumed by Next.js, sync them into a local Next.js checkout, and test the resulting integration. Use when working on React changes that need validation in Next.js, or when asked to run buildForNext, pnpm sync-react, or synchronize a React checkout with Next.js.

Install
npx skills add 'https://github.com/vercel/next.js/tree/canary/.agents/skills/react-sync'
Download bundle ↓
canary · bfcf687Scanned 2026-09-15

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

scripts/build-for-next.sh

scripts/build-for-next.shBrowse 2 files
View on GitHub
← Back to SKILL.md
#!/usr/bin/env bashset -euo pipefailset -x bundles=(  "react/index"  "react/jsx"  "react-jsx-runtime.react-server"  "react-jsx-dev-runtime.react-server"  "react/compiler-runtime"  "react.react-server"  "react-dom/index"  "react-dom/client"  "react-dom/profiling"  "react-dom/server"  "react-dom.react-server"  "react-dom-server.browser"  "react-dom-server.bun"  "react-dom-server.edge"  "react-dom-server.node"  "react-dom-server-legacy.browser"  "react-dom-server-legacy.node"  "react-is"  "scheduler"  "react-server-dom-webpack/"  "react-server-dom-turbopack/") type="BUN_DEV,BUN_PROD,NODE_DEV,NODE_PROD,NODE_PROFILING,ESM_DEV,ESM_PROD,NODE_ES2015" RELEASE_CHANNEL=stable node ./scripts/rollup/build.js "${bundles[@]}" --type="$type"mv ./build/node_modules ./build/oss-stable RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js "${bundles[@]}" --type="$type" --unsafe-partialmv ./build/node_modules ./build/oss-experimental