A fully working vite starter template for VanJS forked from template-ssr-vanilla-ts.
We've created a much better project create-vanjs you can use to kickstart your VanJS projects. This repository will no longer be maintained.
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-projectRun your favorite package manager installation script.
npm installpnpm installdeno installStart the development server.
npm run devpnpm devdeno task devPrerender the application and start the server.
npm run previewpnpm previewdeno task previewPrerender the application.
npm run generateStart the application.
npm run startBuild the application.
npm run buildStart the application.
npm run start- you are expected to create pages in the
src/pagesfolder in order for the prerenderer to work; - for more information about SSR, it's highly recommanded to check the Vite documentation.
Released under MIT.