diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index e7a55f4ba360..0b5a49baa687 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -228,16 +228,16 @@ const baseTemplates = { name: 'React Prerelease (Vite | TypeScript)', /** * 1. Create a Vite project with the React template - * 2. Add React beta versions + * 2. Add React RC versions * 3. Add resolutions for @types/react and @types/react-dom, see https://react.dev/blog/2024/04/25/react-19-upgrade-guide#installing - * 4. Add @types/react and @types/react-dom pointing to the beta packages + * 4. Add @types/react and @types/react-dom pointing to the RC packages */ script: ` npm create vite --yes {{beforeDir}} -- --template react-ts && \ cd {{beforeDir}} && \ - yarn add react@beta react-dom@beta && \ - jq '.resolutions += {"@types/react": "npm:types-react@beta", "@types/react-dom": "npm:types-react-dom@beta"}' package.json > tmp.json && mv tmp.json package.json && \ - yarn add --dev @types/react@npm:types-react@beta @types/react-dom@npm:types-react-dom@beta + yarn add react@rc react-dom@rc && \ + jq '.resolutions += {"@types/react": "npm:types-react@rc", "@types/react-dom": "npm:types-react-dom@rc"}' package.json > tmp.json && mv tmp.json package.json && \ + yarn add --dev @types/react@npm:types-react@rc @types/react-dom@npm:types-react-dom@rc `, expected: { framework: '@storybook/react-vite',