Hi @seanmclem, It seems like Esbuild, which Vite is based on, doesn't use Babel to compile JSX and I think the new JSX transform requires Babel for all the JSX conversion. I'll get back to you if I can confirm this. Thanks for pointing it out.
"We’d like to thank Babel, TypeScript, Create React App, Next.js, Gatsby, ESLint, and Flow maintainers for their help implementing and integrating the new JSX transform. "
If you are using the new JSX transform from React 17, you should disable this rule by extending react/jsx-runtime in your eslint config (add "plugin:react/jsx-runtime" to "extends").
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When using Vite - it still seems to make me use it on react 17
yeah but for the main component and not very component file
Hi @seanmclem, It seems like Esbuild, which Vite is based on, doesn't use Babel to compile JSX and I think the new JSX transform requires Babel for all the JSX conversion. I'll get back to you if I can confirm this. Thanks for pointing it out.
I'm very positive Babel is the reason.
Not just babel. You can use it with vite (with TS, for example). reactjs.org/blog/2020/09/22/introd...
"We’d like to thank Babel, TypeScript, Create React App, Next.js, Gatsby, ESLint, and Flow maintainers for their help implementing and integrating the new JSX transform. "
If you are getting an eslint error on one of the other platforms (like TS), you can just (from github.com/jsx-eslint/eslint-plugi...
If you are using the new JSX transform from React 17, you should disable this rule by extending react/jsx-runtime in your eslint config (add "plugin:react/jsx-runtime" to "extends").