Hello, Actually I'm trying to Build a simple application using Vite+React, also I use UI Lib called RNR link : https://github.com/mrzachnugent/react-native-reusables (Working for mobile and the web on the same time). I'm figuring this issue when I try to serve the application
✘ [ERROR] The JSX syntax extension is not currently enabled
node_modules/@rn-primitives/slot/dist/index.mjs:15:57:
15 │ return React.cloneElement(isTextChildren(children) ? <></> : children, {
╵ ^
The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.
Here is my vite config :
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import reactNativeWeb from "vite-plugin-react-native-web";
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
reactNativeWeb()
],
})
There is any configuration to add to the vite.config.ts ?
Thanks for your help guys.