Skip to content

React SPA using Vite with a Koa backend, in a single repo

License

Notifications You must be signed in to change notification settings

tannineo/react-vite-with-koa

Repository files navigation

react-vite-with-koa

React SPA using Vite as the packaging toolchain, with a simple Koa server.

Server-side Rendering not supported. Better try Next.js or something similar.

test suites included

  • frontend: vitest
  • backend: jest

baseUrl tricks running built *.js files after tsc

pacakge.json "import" config:

https://nodejs.org/api/packages.html#main-entry-point-export

This is for the backend, vite handles everything for frontend.

Use # as the prefix of the import paths, the tsc-built *.js files will keep the import path and apply the "import" config in package.json.

For details, check package.json and tsconfig.build.json.

aws related settings

Check the aws branch.

About

React SPA using Vite with a Koa backend, in a single repo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published