Skip to content

jonluca/vite-typescript-ssr-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

23b550a Β· Nov 3, 2023

History

33 Commits
Nov 3, 2023
Nov 3, 2023
Nov 3, 2023
Nov 3, 2023
May 16, 2021
Nov 3, 2023
Nov 3, 2023
Nov 3, 2023
Nov 3, 2023
Nov 3, 2023
Dec 13, 2022
Oct 3, 2023
Nov 3, 2023
Jan 18, 2022
Oct 3, 2023
Jan 18, 2022
Nov 3, 2023
May 16, 2021
Oct 3, 2023
Nov 3, 2023

Repository files navigation

Vite Typescript React 18 SSR

Node CI

A blazingly modern web development stack. This template repo tries to achieve the minimum viable example for each of the following:

video

Development

yarn
yarn dev:server

That should start the server. It will open to http://localhost:7456.

If you'd like to just develop the UI, you can use

yarn
yarn dev:client

To start the native vite client.

Building

yarn build
yarn serve

yarn build will create the assets in dist - a client and server folder. Serve will run dist/server.js with Node, but feel free to change this to use Docker or some other process manager to suit your deployment needs.

Files

eslintrc.js - a barebones eslint configuration for 2021, that extends off of the recommended ESLint config and prettier

.prettierrc.js - the prettier config

index.html - the vite entrypoint, that includes the entry point for the client

postcss.config.cjs - CommonJS module that defines the PostCSS config

server.ts - The barebones Express server with logic for SSRing Vite pages

tailwind.config.cjs - CommonJS module that defines the Tailwind config

tsconfig.json - TypeScript configuration

vite.config.ts - Vite configuration

CI

We use GitHub actions to build the app. The badge is at the top of the repo. Currently it just confirms that everything builds properly.