You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0d1876d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: templates/rescript-template-vite/README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,11 @@
4
4
5
5
This is a Vite-based template with following setup:
6
6
7
-
-[ReScript](https://rescript-lang.org)11.0 with @rescript/react, [Core](https://github.com/rescript-association/rescript-core) and JSX v4
7
+
-[ReScript](https://rescript-lang.org)12 with [@rescript/react](https://github.com/rescript-lang/rescript-react) and JSX v4 preserve mode
8
8
- ES6 modules (ReScript code compiled to `.res.mjs` files)
9
-
- Vite 6 with React Plugin (Fast Refresh)
10
-
- Tailwind 4
9
+
-[React](https://react.dev) 19 with React DOM
10
+
-[Vite](https://vite.dev) 7 with [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react) 5
11
+
-[Tailwind CSS](https://tailwindcss.com) 4 with [@tailwindcss/vite](https://tailwindcss.com/docs/installation/using-vite)
11
12
12
13
## Development
13
14
@@ -27,6 +28,8 @@ npm run dev
27
28
28
29
### Fast Refresh & ReScript
29
30
31
+
This template enables ReScript JSX preserve mode so Vite's React plugin can process the generated `.res.mjs` files and keep React Fast Refresh working.
32
+
30
33
Make sure to create interface files (`.resi`) for each `*.res` file.
31
34
32
35
Fast Refresh requires you to **only export React components**, and it's easy to unintenionally export other values that will disable Fast Refresh (you will see a message in the browser console whenever this happens).
0 commit comments