Skip to content

Conversation

poteto
Copy link

@poteto poteto commented Aug 29, 2025

This PR builds upon vitejs/vite-plugin-react#799 and adds 2 new variants to create-vite: compiler, and compiler-ts.

This allows new Vite apps to start with React Compiler out of the box.

@poteto poteto force-pushed the vite-react-compiler branch from 446f867 to 78f0bca Compare August 29, 2025 17:51
@poteto poteto changed the title feat(react-compiler): Add React Compiler variants to create-vite feat(reactcompiler): Add React Compiler variants to create-vite Aug 29, 2025
Comment on lines +134 to +136
customCommand:
'npm exec degit vitejs/vite-plugin-react/packages/plugin-react/examples/compiler-ts TARGET_DIR',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placeholder TARGET_DIR in the customCommand may not be automatically replaced at runtime. Please verify that the create-vite CLI properly handles this substitution pattern. If not, users might end up with a literal directory named "TARGET_DIR" instead of their intended project directory. Consider checking how variable substitution works in custom commands or updating to use the correct placeholder format supported by the system.

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

This PR builds upon vitejs/vite-plugin-react#799
and adds 2 new variants to create-vite: compiler, and compiler-ts.

This allows new Vite apps to start with React Compiler out of the box.
@poteto poteto force-pushed the vite-react-compiler branch from 78f0bca to b29d9ab Compare August 29, 2025 17:56
@poteto poteto changed the title feat(reactcompiler): Add React Compiler variants to create-vite feat(react-compiler): add React Compiler variants to create-vite Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant