This template was created for a blog post for fsAdvent calendar 2024
The template provides a minimal setup to get React working in Vite with HMR and some ESLint rules, it starts from the basic vite template but it was adapted to run F# via Fable, and use Feliz library for awesome React built in F# DSL.
As an alternative to the official dotnet template for Feliz it adopts the remarkable Vite Fable Plugin.
Currently, two official plugins are available (for react):
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
clone via git to use with npm
, you can then install and run as usual
npm ci && npm run dev
if you want to use bun
bun create jkone27/feliz-vite
you can delete package-lock.json
file then, to have dotnet tools installed correctly cd into your directory and run:
bun install -D --trust vite-plugin-fable
then
bun install
then
bun run dev