lovable-ssr 0.1.9 → 0.1.11
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.
- package/dist/components/AppRoutes.d.ts.map +1 -1
- package/dist/components/AppRoutes.js +2 -2
- package/dist/components/BrowserRouteDataProvider.d.ts.map +1 -1
- package/dist/components/BrowserRouteDataProvider.js +8 -6
- package/dist/router/RouteDataContext.d.ts +5 -1
- package/dist/router/RouteDataContext.d.ts.map +1 -1
- package/dist/router/RouteDataContext.js +16 -5
- package/dist/router/RouterService.d.ts +2 -1
- package/dist/router/RouterService.d.ts.map +1 -1
- package/dist/router/RouterService.js +4 -3
- package/dist/ssr/render.d.ts +4 -0
- package/dist/ssr/render.d.ts.map +1 -1
- package/dist/ssr/render.js +5 -1
- package/dist/ssr/server.d.ts.map +1 -1
- package/dist/ssr/server.js +33 -3
- package/package.json +11 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/components/AppRoutes.tsx"],"names":[],"mappings":"AAMA,wBAAgB,SAAS,
|
|
1
|
+
{"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/components/AppRoutes.tsx"],"names":[],"mappings":"AAMA,wBAAgB,SAAS,4CAiDxB"}
|
|
@@ -13,11 +13,11 @@ export function AppRoutes() {
|
|
|
13
13
|
routeParams: {},
|
|
14
14
|
searchParams: {},
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
params.searchParams = RouterService.searchParams(location.search ?? '');
|
|
17
|
+
const routeKey = matchedRoute ? buildRouteKey(matchedRoute.path, params.routeParams, params.searchParams) : '';
|
|
17
18
|
const { data, setData } = useRouteData();
|
|
18
19
|
const currentData = routeKey ? data[routeKey] : undefined;
|
|
19
20
|
const getServerData = matchedRoute?.Component?.getServerData;
|
|
20
|
-
params.searchParams = RouterService.searchParams(pathname);
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
if (!routeKey || !getServerData || currentData !== undefined)
|
|
23
23
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserRouteDataProvider.d.ts","sourceRoot":"","sources":["../../src/components/BrowserRouteDataProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"BrowserRouteDataProvider.d.ts","sourceRoot":"","sources":["../../src/components/BrowserRouteDataProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CA0B7E"}
|
|
@@ -12,12 +12,14 @@ import { RouteDataProvider } from '../router/RouteDataContext.js';
|
|
|
12
12
|
export function BrowserRouteDataProvider({ children }) {
|
|
13
13
|
const preloadedData = typeof window !== 'undefined' ? (window.__PRELOADED_DATA__ ?? {}) : {};
|
|
14
14
|
const pathname = typeof window !== 'undefined' ? window.location.pathname || '/' : '/';
|
|
15
|
+
const searchParams = typeof window !== 'undefined' ? RouterService.searchParams(window.location.search ?? '') : {};
|
|
15
16
|
const matchedRoute = RouterService.matchRoute(pathname);
|
|
16
|
-
const
|
|
17
|
+
const routeParamsResult = matchedRoute
|
|
17
18
|
? RouterService.routeParams(matchedRoute.path, pathname)
|
|
18
|
-
: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
: { routeParams: {}, searchParams: {} };
|
|
20
|
+
const initialParams = {
|
|
21
|
+
routeParams: routeParamsResult.routeParams,
|
|
22
|
+
searchParams: Object.keys(searchParams).length > 0 ? searchParams : routeParamsResult.searchParams,
|
|
23
|
+
};
|
|
24
|
+
return (_jsx(RouteDataProvider, { initialData: preloadedData, initialRoute: matchedRoute, initialParams: initialParams, children: children }));
|
|
23
25
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export type RouteDataState = Record<string, Record<string, unknown>>;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Builds a stable cache key for route data. Includes path, route params and optionally search params
|
|
5
|
+
* so that the same path with different query strings (e.g. ?filter=FPS vs ?filter=RPG) gets different keys.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildRouteKey(path: string, routeParams: Record<string, string>, searchParams?: Record<string, string>): string;
|
|
4
8
|
interface RouteDataContextValue {
|
|
5
9
|
data: RouteDataState;
|
|
6
10
|
setData: (routeKey: string, value: Record<string, unknown>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteDataContext.d.ts","sourceRoot":"","sources":["../../src/router/RouteDataContext.tsx"],"names":[],"mappings":"AAAA,OAAc,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAErE,wBAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"RouteDataContext.d.ts","sourceRoot":"","sources":["../../src/router/RouteDataContext.tsx"],"names":[],"mappings":"AAAA,OAAc,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAErE;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,MAAM,CAYR;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACrE;AAID,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAChF;AAED,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,aAGC,GACF,EAAE,sBAAsB,2CAmBxB;AAED,wBAAgB,YAAY,IAAI,qBAAqB,CAMpD"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useCallback, useContext, useMemo, useState, } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Builds a stable cache key for route data. Includes path, route params and optionally search params
|
|
5
|
+
* so that the same path with different query strings (e.g. ?filter=FPS vs ?filter=RPG) gets different keys.
|
|
6
|
+
*/
|
|
7
|
+
export function buildRouteKey(path, routeParams, searchParams) {
|
|
8
|
+
const sortedRoute = Object.keys(routeParams)
|
|
5
9
|
.sort()
|
|
6
|
-
.reduce((acc, k) => ({ ...acc, [k]:
|
|
7
|
-
|
|
10
|
+
.reduce((acc, k) => ({ ...acc, [k]: routeParams[k] }), {});
|
|
11
|
+
let key = `${path}|${JSON.stringify(sortedRoute)}`;
|
|
12
|
+
if (searchParams && Object.keys(searchParams).length > 0) {
|
|
13
|
+
const sortedSearch = Object.keys(searchParams)
|
|
14
|
+
.sort()
|
|
15
|
+
.reduce((acc, k) => ({ ...acc, [k]: searchParams[k] }), {});
|
|
16
|
+
key += `|${JSON.stringify(sortedSearch)}`;
|
|
17
|
+
}
|
|
18
|
+
return key;
|
|
8
19
|
}
|
|
9
20
|
const RouteDataContext = createContext(null);
|
|
10
21
|
export function RouteDataProvider({ children, initialData, initialRoute, initialParams = {
|
|
@@ -12,7 +23,7 @@ export function RouteDataProvider({ children, initialData, initialRoute, initial
|
|
|
12
23
|
searchParams: {},
|
|
13
24
|
}, }) {
|
|
14
25
|
const initialKey = initialRoute && Object.keys(initialData ?? {}).length > 0
|
|
15
|
-
? buildRouteKey(initialRoute.path, initialParams.routeParams)
|
|
26
|
+
? buildRouteKey(initialRoute.path, initialParams.routeParams, initialParams.searchParams)
|
|
16
27
|
: null;
|
|
17
28
|
const [data, setDataState] = useState(() => initialKey && initialData ? { [initialKey]: initialData } : {});
|
|
18
29
|
const setData = useCallback((routeKey, value) => {
|
|
@@ -3,7 +3,8 @@ declare function matchPath(pathPattern: string, pathname: string): boolean;
|
|
|
3
3
|
declare function isSsrRoute(pathname: string): boolean;
|
|
4
4
|
declare function matchRoute(pathname: string): RouteConfig | undefined;
|
|
5
5
|
declare function routeParams(routePath: string, pathname?: string): Record<'routeParams' | 'searchParams', Record<string, string>>;
|
|
6
|
-
|
|
6
|
+
/** Parses the URL query string (e.g. "?filter=FPS" or "filter=FPS") into key/value pairs. */
|
|
7
|
+
declare function searchParams(queryString: string): Record<string, string>;
|
|
7
8
|
declare const RouterService: {
|
|
8
9
|
isSsrRoute: typeof isSsrRoute;
|
|
9
10
|
matchPath: typeof matchPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouterService.d.ts","sourceRoot":"","sources":["../../src/router/RouterService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,iBAAS,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOjE;AAED,iBAAS,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAG7C;AAED,iBAAS,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAM7D;AAED,iBAAS,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,aAAa,GAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAazH;AACD,iBAAS,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"RouterService.d.ts","sourceRoot":"","sources":["../../src/router/RouterService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,iBAAS,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOjE;AAED,iBAAS,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAG7C;AAED,iBAAS,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAM7D;AAED,iBAAS,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,aAAa,GAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAazH;AACD,6FAA6F;AAC7F,iBAAS,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAGjE;AAED,QAAA,MAAM,aAAa;;;;;;CAMlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -36,9 +36,10 @@ function routeParams(routePath, pathname) {
|
|
|
36
36
|
});
|
|
37
37
|
return params;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
/** Parses the URL query string (e.g. "?filter=FPS" or "filter=FPS") into key/value pairs. */
|
|
40
|
+
function searchParams(queryString) {
|
|
41
|
+
const parsed = new URLSearchParams(queryString);
|
|
42
|
+
return Object.fromEntries(parsed.entries());
|
|
42
43
|
}
|
|
43
44
|
const RouterService = {
|
|
44
45
|
isSsrRoute,
|
package/dist/ssr/render.d.ts
CHANGED
|
@@ -6,5 +6,9 @@ export interface RenderResult {
|
|
|
6
6
|
export interface RenderOptions {
|
|
7
7
|
wrap?: (children: ReactNode) => ReactNode;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders the app for a single URL. Called once per request with that request's URL.
|
|
11
|
+
* getServerData is invoked only for the route that matches this URL (never for all routes).
|
|
12
|
+
*/
|
|
9
13
|
export declare function render(url: string, options?: RenderOptions): Promise<RenderResult>;
|
|
10
14
|
//# sourceMappingURL=render.d.ts.map
|
package/dist/ssr/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/ssr/render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,SAAS,CAAC;CAC3C;AAED,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAqCxF"}
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/ssr/render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,SAAS,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAqCxF"}
|
package/dist/ssr/render.js
CHANGED
|
@@ -4,6 +4,10 @@ import { StaticRouter } from 'react-router-dom/server';
|
|
|
4
4
|
import RouterService from '../router/RouterService.js';
|
|
5
5
|
import { RouteDataProvider } from '../router/RouteDataContext.js';
|
|
6
6
|
import { AppRoutes } from '../components/AppRoutes.js';
|
|
7
|
+
/**
|
|
8
|
+
* Renders the app for a single URL. Called once per request with that request's URL.
|
|
9
|
+
* getServerData is invoked only for the route that matches this URL (never for all routes).
|
|
10
|
+
*/
|
|
7
11
|
export async function render(url, options) {
|
|
8
12
|
const fullUrl = new URL(url, 'http://localhost');
|
|
9
13
|
const pathname = fullUrl.pathname || '/';
|
|
@@ -12,7 +16,7 @@ export async function render(url, options) {
|
|
|
12
16
|
routeParams: {},
|
|
13
17
|
searchParams: {},
|
|
14
18
|
};
|
|
15
|
-
const searchParams = matchedRoute ? RouterService.searchParams(
|
|
19
|
+
const searchParams = matchedRoute ? RouterService.searchParams(fullUrl.search) : {};
|
|
16
20
|
params.searchParams = searchParams;
|
|
17
21
|
let preloadedData = { is_success: true };
|
|
18
22
|
const getServerData = matchedRoute?.Component?.getServerData;
|
package/dist/ssr/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/ssr/server.ts"],"names":[],"mappings":"AAGA,OAAgB,EAAE,KAAK,OAAO,EAAkD,MAAM,SAAS,CAAC;AAIhG,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/ssr/server.ts"],"names":[],"mappings":"AAGA,OAAgB,EAAE,KAAK,OAAO,EAAkD,MAAM,SAAS,CAAC;AAIhG,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA8MD,wBAAsB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC;IACtE,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACxD,CAAC,CAOD;AAED;qDACqD;AACrD,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,QAO7D"}
|
package/dist/ssr/server.js
CHANGED
|
@@ -15,6 +15,15 @@ class SsrServer {
|
|
|
15
15
|
config;
|
|
16
16
|
isProd;
|
|
17
17
|
_rendererCache;
|
|
18
|
+
/** On-demand SSR cache: key = pathname + normalized search params, value = render result. Only used in production. */
|
|
19
|
+
_ssrCache = new Map();
|
|
20
|
+
normalizeCacheKey(url) {
|
|
21
|
+
const u = new URL(url, 'http://localhost');
|
|
22
|
+
const search = new URLSearchParams(u.search);
|
|
23
|
+
const sorted = new URLSearchParams([...search.entries()].sort((a, b) => a[0].localeCompare(b[0])));
|
|
24
|
+
const q = sorted.toString();
|
|
25
|
+
return (u.pathname || '/') + (q ? `?${q}` : '');
|
|
26
|
+
}
|
|
18
27
|
constructor(config) {
|
|
19
28
|
this.config = {
|
|
20
29
|
root: path.resolve(config.root),
|
|
@@ -86,9 +95,30 @@ class SsrServer {
|
|
|
86
95
|
}
|
|
87
96
|
async renderSsr(url, res) {
|
|
88
97
|
const { template, render } = await this.getSsrRenderer();
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
if (process.env.NODE_ENV !== 'production' && process.env.LOVABLE_SSR_DEBUG) {
|
|
99
|
+
console.log('[lovable-ssr] render(url)', url);
|
|
100
|
+
}
|
|
101
|
+
let appHtml;
|
|
102
|
+
let preloadedData;
|
|
103
|
+
if (this.isProd) {
|
|
104
|
+
const cacheKey = this.normalizeCacheKey(url);
|
|
105
|
+
const cached = this._ssrCache.get(cacheKey);
|
|
106
|
+
if (cached) {
|
|
107
|
+
appHtml = cached.html;
|
|
108
|
+
preloadedData = cached.preloadedData;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const result = await render(url);
|
|
112
|
+
appHtml = typeof result.html === 'string' ? result.html : '';
|
|
113
|
+
preloadedData = result.preloadedData ?? {};
|
|
114
|
+
this._ssrCache.set(cacheKey, { html: appHtml, preloadedData });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
const result = await render(url);
|
|
119
|
+
appHtml = typeof result.html === 'string' ? result.html : '';
|
|
120
|
+
preloadedData = result.preloadedData ?? {};
|
|
121
|
+
}
|
|
92
122
|
let html = template.replace('<div id="root"></div>', `<div id="root">${appHtml}</div>`);
|
|
93
123
|
html = this.injectPreloadedData(html, preloadedData);
|
|
94
124
|
if (this.vite) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lovable-ssr",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "SSR and route data engine for Lovable projects",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ssr",
|
|
7
|
+
"react",
|
|
8
|
+
"vite",
|
|
9
|
+
"express",
|
|
10
|
+
"lovable",
|
|
11
|
+
"getServerData",
|
|
12
|
+
"route-registry",
|
|
13
|
+
"server-side-rendering"
|
|
14
|
+
],
|
|
5
15
|
"type": "module",
|
|
6
16
|
"main": "./dist/index.js",
|
|
7
17
|
"module": "./dist/index.js",
|