@lomray/vite-ssr-boost 8.0.0-beta.6 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +43 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,60 +1,65 @@
1
1
  # Vite SSR BOOST
2
2
 
3
- <p align="center">
4
- <img src="https://raw.githubusercontent.com/Lomray-Software/vite-ssr-boost/prod/logo.png" alt="Vite SSR BOOST logo" width="250" height="250">
5
- </p>
3
+ SSR for React Router apps in [Data mode](https://reactrouter.com/start/modes), without moving to Framework mode and without rewriting the app. `@lomray/vite-ssr-boost` adds server rendering to your Vite project while keeping your route objects and components. Build SSR and SPA output from the same app, and choose a managed Express server or a Fetch handler for your own transport.
6
4
 
7
- SSR and SPA toolkit for React Router apps on top of Vite.
5
+ ## Who this is for
8
6
 
9
- It is built for applications that want to keep Vite and React Router visible, but still need the practical runtime layer for SSR, SPA fallback, streaming, custom entrypoints and deployment-oriented builds.
7
+ - Teams adding SSR to a Vite SPA with React Router route objects.
8
+ - Teams that need server rendering and SPA output from one application.
9
+ - Teams that want to control request hooks, response headers and deployment.
10
10
 
11
- ## Why use it
11
+ ## What you keep
12
12
 
13
- - SSR and SPA from one route tree
14
- - React Router on both client and server
15
- - stream rendering with request lifecycle hooks
16
- - a Vite-native plugin and CLI flow
17
- - a Fetch-based SSR core with Node, Express, Fastify, Hono and edge adapters
18
- - response-aware helpers such as redirects and status codes
19
- - custom entrypoints for mobile, embedded and service-worker-friendly shells
13
+ - Your Vite configuration and plugins, with the SSR plugin added.
14
+ - Your React Router route objects.
15
+ - Your components, after removing browser globals from server execution.
16
+ - Your React version within the package's peer range: React and React DOM `>=18.2.0`.
17
+ - Your hosting choice, provided it can run the selected SSR transport or serve SPA files.
20
18
 
21
- <p align="center">
22
- <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=reliability_rating" alt="reliability">
23
- <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=security_rating" alt="Security Rating">
24
- <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=sqale_rating" alt="Maintainability Rating">
25
- <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=vulnerabilities" alt="Vulnerabilities">
26
- <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=bugs" alt="Bugs">
27
- <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=ncloc" alt="Lines of Code">
28
- <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=coverage" alt="code coverage">
29
- <img src="https://img.shields.io/npm/v/@lomray/vite-ssr-boost?label=semantic%20release&logo=semantic-release" alt="semantic version">
30
- </p>
19
+ ## What you add
20
+
21
+ Add `SsrBoost()` to the Vite plugins, wire `client.ts` and `server.ts`, and replace the Vite scripts with `ssr-boost` commands. The [migration guide](./docs/guide/migrate-existing-spa.md) includes these entries and the HTML outlet, copied from the minimal example.
22
+
23
+ ## Choose your server
24
+
25
+ **Managed CLI (default).** Use `ssr-boost dev` for Express with Vite development and HMR, then `ssr-boost build` and `ssr-boost start` for production assets and SSR. The server entry is `@lomray/vite-ssr-boost/adapters/express/entry`, with hooks for requests, rendering and responses.
26
+
27
+ **Fetch handler.** Import `createHandler` from `@lomray/vite-ssr-boost/core/handler` and connect it through `adapters/node`, `adapters/express`, `adapters/fastify`, `adapters/hono` or `adapters/edge`. Your transport owns the development server, static assets and route-asset injection; follow [Runtime adapters](./docs/guide/runtime-adapters.md) when you need this control.
31
28
 
32
- ## Install
29
+ ## Not a fit when
30
+
31
+ - You need an implementation of React Server Components and Server Actions.
32
+ - You want the package to impose file-system routing conventions.
33
+ - You want zero server ownership for SSR.
34
+
35
+ ## Install and template quick start
33
36
 
34
37
  ```bash
35
38
  npm i @lomray/vite-ssr-boost
36
39
  ```
37
40
 
38
- Requires Node 22.12+. Your React Router and Babel versions may require a newer Node release.
39
- Start with the [React template](https://github.com/Lomray-Software/vite-template):
41
+ The package declares `engines.node: ">=22.12.0"`. The example uses Node 22.23.2; React Router and build tools can raise the required Node version.
40
42
 
41
- ```bash
42
- git clone https://github.com/Lomray-Software/vite-template.git
43
- cd vite-template
44
- npm ci
45
- npm run develop
46
- ```
43
+ Start with the [minimal template](https://github.com/Lomray-Software/vite-template/tree/example/minimal): run `git clone --branch example/minimal https://github.com/Lomray-Software/vite-template.git`, then `cd vite-template`, `npm ci` and `npm run develop`. Its six direct runtime dependencies are React, React DOM, React Router, vite-ssr-boost, `@lomray/react-head-manager` and `isbot`.
47
44
 
48
- For production, run `npm run build` and `npm run start:ssr`. For a static SPA, run
49
- `npm run build:spa` and `npm run start:spa`.
45
+ For production, run `npm run build` and `npm run start:ssr`. For a SPA build, run `npm run build:spa` and `npm run start:spa`. See [Example projects](./docs/examples/index.md) for the `prod` template with state management and deployment workflows.
46
+
47
+ Already running this in production? Point our [free performance audit](https://audit.lomray.com/?utm_source=github&utm_medium=readme-vite-ssr-boost&utm_campaign=owned-surface-github) at the URL. It reports Core Web Vitals, JavaScript bundle weight and whether the HTML really arrives server-rendered. No signup.
50
48
 
51
49
  ## Documentation
52
50
 
53
- Full documentation lives here: [lomray-software.github.io/vite-ssr-boost](https://lomray-software.github.io/vite-ssr-boost/)
51
+ Read the [documentation site](https://lomray-software.github.io/vite-ssr-boost/), the [comparison guide](./docs/guide/choosing.md) and the [FAQ](./docs/reference/faq.md).
54
52
 
55
- Existing Express applications move one import to `adapters/express/entry`; hooks are unchanged. See
56
- [runtime adapters](https://lomray-software.github.io/vite-ssr-boost/guide/runtime-adapters)
57
- for the Fetch API and the differences between the managed CLI server and a custom runtime.
53
+ <p align="center">
54
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=reliability_rating" alt="reliability">
55
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=security_rating" alt="Security Rating">
56
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=sqale_rating" alt="Maintainability Rating">
57
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=vulnerabilities" alt="Vulnerabilities">
58
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=bugs" alt="Bugs">
59
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=ncloc" alt="Lines of Code">
60
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&metric=coverage" alt="code coverage">
61
+ <img src="https://img.shields.io/npm/v/@lomray/vite-ssr-boost?label=semantic%20release&logo=semantic-release" alt="semantic version">
62
+ </p>
58
63
 
59
64
  ## License
60
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lomray/vite-ssr-boost",
3
- "version": "8.0.0-beta.6",
3
+ "version": "8.0.0",
4
4
  "description": "Vite plugin for create awesome SSR or SPA applications on React.",
5
5
  "type": "module",
6
6
  "exports": {