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
- Host: GitHub
- URL: https://github.com/SilverDY/vite-super-ssr
- Owner: SilverDY
- License: mit
- Created: 2022-07-30T17:52:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-01T13:55:19.000Z (over 2 years ago)
- Last Synced: 2024-10-31T15:38:39.771Z (6 months ago)
- Language: TypeScript
- Size: 3.12 MB
- Stars: 30
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - FSD + Typescript + React + Vite SSR template
README
# โก vite-super-ssr template
---
##### This template repo tries to achieve the minimum viable example for a modern front-end applicationThe 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 โ๏ธ