Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thednp/vite-starter-vanjs-ssr-jsx
A vite starter for VanJS with SSR and JSX transformation
https://github.com/thednp/vite-starter-vanjs-ssr-jsx
expressjs jsx ssg ssr vanjs vitejs
Last synced: 12 days ago
JSON representation
A vite starter for VanJS with SSR and JSX transformation
- Host: GitHub
- URL: https://github.com/thednp/vite-starter-vanjs-ssr-jsx
- Owner: thednp
- License: mit
- Created: 2024-12-24T17:50:34.000Z (16 days ago)
- Default Branch: master
- Last Pushed: 2024-12-24T22:04:01.000Z (16 days ago)
- Last Synced: 2024-12-24T22:20:03.438Z (16 days ago)
- Topics: expressjs, jsx, ssg, ssr, vanjs, vitejs
- Language: TypeScript
- Homepage: https://stackblitz.com/~/github.com/thednp/vite-starter-vanjs-ssr-jsx
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## vite-starter-vanjs-ssr-jsx
A fully working vite starter template for [VanJS](https://vanjs.org) forked from [template-ssr-vanilla-ts](https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-vanilla-ts).**Features**:
* SSR server powered by express;
* SSG prerender script included;
* JSX transformation powered by [vite-plugin-vanjs](https://github.com/thednp/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](https://github.com/thednp/vite-plugin-vanjs).### Install
Clone the repository from Github.
```bash
git clone https://github.com/thednp/vite-starter-vanjs-ssr-jsx.git my-project
cd my-project
```Run your favorite package manager installation script.
```bash
npm install
``````bash
pnpm install
``````bash
deno install
```### Development
Start the development server.
```bash
npm run dev
``````bash
pnpm dev
``````bash
deno task dev
```### Preview
Prerender the application and start the server.
```bash
npm run preview
``````bash
pnpm preview
``````bash
deno task preview
```### Build a Static Application
Prerender the application.
```bash
npm run generate
```Start the application.
```bash
npm run start
```### Build a Server-Side Rendering Application
Build the application.
```bash
npm run build
```Start the application.
```bash
npm run start
```### Other Notes
* 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](https://vite.dev/guide/ssr.html).### License
Released under [MIT](LICENSE).