An open API service indexing awesome lists of open source software.

https://github.com/SilverDY/vite-super-ssr

Template for front-end projects
https://github.com/SilverDY/vite-super-ssr

Last synced: about 1 month ago
JSON representation

Template for front-end projects

Awesome Lists containing this project

README

        



Vite logo


React logo

# โšก vite-super-ssr template
---
##### This template repo tries to achieve the minimum viable example for a modern front-end application

The list of features:

- โšก๏ธ [Vite 3](https://vitejs.dev/)
- ๐Ÿค– [vite-plugin-ssr (Suspense support)](https://vite-plugin-ssr.com/)
- โš™๏ธ [React 18](https://reactjs.org/)
- ๐Ÿงน [Typescript](https://www.typescriptlang.org/)
- โœจ [ESLint + Prettier](https://eslint.org/)
- ๐Ÿ”ƒ [Axios](https://formatjs.io/docs/getting-started/installation/)
- ๐Ÿ›ฃ [React router 6](https://reactrouter.com/en/v6.3.0/getting-started/overview) - optional
- ๐Ÿ‘ป [Jotai](https://jotai.org/) - optional
- ๐Ÿ’Ž [Material v5](https://formatjs.io/docs/getting-started/installation/) - optional
- ๐ŸŒ [React intl](https://formatjs.io/docs/getting-started/installation/) - optional
- ๐Ÿ“‹ [React Hook Form](https://react-hook-form.com/) - optional
- ๐Ÿ›  [Feature-Sliced Design](https://feature-sliced.design/) (Architectural methodology) - optional

---
## Commands
```js
// build development
yarn start

// build development client only
yarn start:client

// build production
yarn build
```

## Troubleshooting
### Requests are stalled forever [(vite docs link)](https://vitejs.dev/guide/troubleshooting.html#dev-server)

If you are using Linux, file descriptor limits and inotify limits may be causing the issue. As Vite does not bundle most of the files, browsers may request many files which require many file descriptors, going over the limit.

To solve this:

- Increase file descriptor limit by `ulimit`

```shell
# Check current limit
$ ulimit -Sn
# Change limit (temporary)
$ ulimit -Sn 10000 # You might need to change the hard limit too
# Restart your browser
```

- Increase the following inotify related limits by `sysctl`

```shell
# Check current limits
$ sysctl fs.inotify
# Change limits (temporary)
$ sudo sysctl fs.inotify.max_queued_events=16384
$ sudo sysctl fs.inotify.max_user_instances=8192
$ sudo sysctl fs.inotify.max_user_watches=524288
```

## P.S.
Feel free to customize the template. You can easily remove any feature you want and add your own โœŒ๏ธ