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
This template leverages [Remix SPA Mode](https://remix.run/docs/en/main/guides/spa-mode) to build your app as a Single-Page Application using [Client Data](https://remix.run/docs/en/main/guides/client-data) for all of your data loads and mutations.
You can develop your SPA app just like you would a normal Remix app, via:
14
-
15
-
```shellscript
16
-
npm run dev
17
-
```
18
-
19
-
## Production
20
-
21
-
When you are ready to build a production version of your app, `npm run build` will generate your assets and an `index.html` for the SPA.
22
-
23
-
```shellscript
24
-
npm run build
25
-
```
26
-
27
-
### Preview
28
-
29
-
You can preview the build locally with [vite preview](https://vitejs.dev/guide/cli#vite-preview) to serve all routes via the single `index.html` file:
30
-
31
-
```shellscript
32
-
npm run preview
33
-
```
34
-
35
-
> [!IMPORTANT]
36
-
>
37
-
> `vite preview` is not designed for use as a production server
38
-
39
-
### Deployment
40
-
41
-
You can then serve your app from any HTTP server of your choosing. The server should be configured to serve multiple paths from a single root `/index.html` file (commonly called "SPA fallback"). Other steps may be required if the server doesn't directly support this functionality.
42
-
43
-
For a simple example, you could use [sirv-cli](https://www.npmjs.com/package/sirv-cli):
44
-
45
-
```shellscript
46
-
npx sirv-cli build/client/ --single
47
-
```
48
-
49
-
## Styling
50
-
51
-
This template comes with [Tailwind CSS](https://tailwindcss.com/) already configured for a simple default starting experience. You can use whatever css framework you prefer. See the [Vite docs on css](https://vitejs.dev/guide/features.html#css) for more information.
0 commit comments