We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to use vite with react 16.10.0, got the error when start the dev server
https://stackblitz.com/edit/vitejs-vite-q3yh8t?file=src%2Fmain.tsx
package-lock.json
npm install && npm run dev
❯ npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsers Need to install the following packages: [email protected] System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: @vitejs/plugin-react: ^4.3.4 => 4.3.4 vite: ^6.0.1 => 6.0.1
npm
No response
The text was updated successfully, but these errors were encountered:
react({ jsxRuntime: 'classic' }) is needed for React 16 https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md#jsxruntime Then you need to manually have import React from "react" for jsx files https://stackblitz.com/edit/vitejs-vite-n8d2mc?file=tsconfig.app.json. You can use compilerOptions.jsx: "react" to ensure typescript help catching missing React.
react({ jsxRuntime: 'classic' })
import React from "react"
compilerOptions.jsx: "react"
React
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Try to use vite with react 16.10.0, got the error when start the dev server
Reproduction
https://stackblitz.com/edit/vitejs-vite-q3yh8t?file=src%2Fmain.tsx
Steps to reproduce
package-lock.json
npm install && npm run dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: