A fully working vite starter template for VanJS forked from template-ssr-vanilla-ts.
Features:
- SSR server powered by express;
- SSG prerender script included;
- JSX transformation powered by vite-plugin-vanjs with support for most important features such as Fragment, styles, attributes as State, strong types;
- isomorphic render also powered by vite-plugin-vanjs.
Clone the repository from Github.
git clone https://github.com/thednp/vite-starter-vanjs-ssr-jsx.git my-project
cd my-project
Run your favorite package manager installation script.
npm install
pnpm install
deno install
Start the development server.
npm run dev
pnpm dev
deno task dev
Prerender the application and start the server.
npm run preview
pnpm preview
deno task preview
Prerender the application.
npm run generate
Start the application.
npm run start
Build the application.
npm run build
Start the application.
npm run start
- you are expected to create pages in the
src/pages
folder in order for the prerenderer to work; - for more information about SSR, it's highly recommanded to check the Vite documentation.
Released under MIT.