Filip
Filip
SSolidJS
Created by Filip on 4/24/2023 in #support
Vite app with Solid and React files simultaneously
I'm using a Laravel app in which i have several Solid components that I used in my traditional server side templates. I use Vite for bundling and transpiling these components with vite-plugin-solid and it worked fine until i added React and its Vite plugin (@vitejs/plugin-react) as I also plan to use React as my main "templating engine" with some Solid components sprinkled (e.g. with https://github.com/Sawtaytoes/reactjs-solidjs-bridge package). My guess is that Vite gets confused and either uses Solid to compile React's JSX or vice versa. Is there a way i can tell Vite some files use Solid's flavor of JSX and the rest use React's? Just like I'm telling TypeScript I'm using Solid's JSX in Solid component files by using @jsxImportSource pragma.
3 replies