webstudio 0.217.0 → 0.219.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.
- package/lib/cli.js +709 -644
- package/package.json +28 -26
- package/templates/cloudflare/package.json +2 -2
- package/templates/cloudflare/vite.config.ts +8 -0
- package/templates/defaults/app/route-templates/html.tsx +1 -0
- package/templates/defaults/package.json +12 -12
- package/templates/defaults/vite.config.ts +8 -0
- package/templates/react-router/app/route-templates/html.tsx +1 -0
- package/templates/react-router/package.json +11 -11
- package/templates/react-router/vite.config.ts +8 -0
- package/templates/react-router-cloudflare/app/constants.mjs +21 -0
- package/templates/react-router-cloudflare/app/entry.server.tsx +43 -0
- package/templates/react-router-cloudflare/package.json +12 -0
- package/templates/react-router-cloudflare/react-router.config.ts +7 -0
- package/templates/react-router-cloudflare/tsconfig.json +23 -0
- package/templates/react-router-cloudflare/vite.config.ts +15 -0
- package/templates/react-router-cloudflare/workers/app.ts +26 -0
- package/templates/react-router-cloudflare/wrangler.jsonc +6 -0
- package/templates/react-router-docker/package.json +2 -2
- package/templates/react-router-netlify/package.json +1 -1
- package/templates/react-router-netlify/vite.config.ts +8 -0
- package/templates/react-router-vercel/package.json +1 -1
- package/templates/saas-helpers/vite.config.ts +2 -2
- package/templates/ssg/app/route-templates/html/+Head.tsx +9 -1
- package/templates/ssg/package.json +9 -9
- package/templates/ssg/vite.config.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.219.0",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"env-paths": "^3.0.0",
|
|
36
36
|
"nanoid": "^5.1.5",
|
|
37
37
|
"p-limit": "^6.2.0",
|
|
38
|
-
"parse5": "7.
|
|
38
|
+
"parse5": "7.3.0",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"reserved-identifiers": "^1.0.0",
|
|
41
41
|
"tinyexec": "^0.3.2",
|
|
@@ -43,42 +43,44 @@
|
|
|
43
43
|
"zod": "^3.24.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
+
"@cloudflare/vite-plugin": "^1.1.0",
|
|
46
47
|
"@netlify/vite-plugin-react-router": "^1.0.1",
|
|
47
|
-
"@react-router/dev": "^7.5.
|
|
48
|
-
"@react-router/fs-routes": "^7.5.
|
|
49
|
-
"@remix-run/cloudflare": "^2.16.
|
|
50
|
-
"@remix-run/cloudflare-pages": "^2.16.
|
|
51
|
-
"@remix-run/dev": "^2.16.
|
|
52
|
-
"@remix-run/node": "^2.16.
|
|
53
|
-
"@remix-run/react": "^2.16.
|
|
54
|
-
"@remix-run/server-runtime": "^2.16.
|
|
48
|
+
"@react-router/dev": "^7.5.3",
|
|
49
|
+
"@react-router/fs-routes": "^7.5.3",
|
|
50
|
+
"@remix-run/cloudflare": "^2.16.5",
|
|
51
|
+
"@remix-run/cloudflare-pages": "^2.16.5",
|
|
52
|
+
"@remix-run/dev": "^2.16.5",
|
|
53
|
+
"@remix-run/node": "^2.16.5",
|
|
54
|
+
"@remix-run/react": "^2.16.5",
|
|
55
|
+
"@remix-run/server-runtime": "^2.16.5",
|
|
55
56
|
"@types/react": "^18.2.70",
|
|
56
57
|
"@types/react-dom": "^18.2.25",
|
|
57
58
|
"@types/yargs": "^17.0.33",
|
|
58
59
|
"@vercel/react-router": "^1.1.0",
|
|
59
|
-
"@vitejs/plugin-react": "^4.
|
|
60
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
60
61
|
"h3": "^1.15.1",
|
|
61
62
|
"ipx": "^3.0.3",
|
|
63
|
+
"isbot": "^5.1.25",
|
|
62
64
|
"prettier": "3.5.3",
|
|
63
65
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
64
66
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
65
|
-
"react-router": "^7.5.
|
|
67
|
+
"react-router": "^7.5.3",
|
|
66
68
|
"ts-expect": "^1.3.0",
|
|
67
|
-
"vike": "^0.4.
|
|
68
|
-
"vite": "^
|
|
69
|
-
"vitest": "^3.
|
|
69
|
+
"vike": "^0.4.229",
|
|
70
|
+
"vite": "^6.3.4",
|
|
71
|
+
"vitest": "^3.1.2",
|
|
70
72
|
"wrangler": "^3.63.2",
|
|
71
|
-
"@webstudio-is/css-engine": "0.
|
|
72
|
-
"@webstudio-is/http-client": "0.
|
|
73
|
-
"@webstudio-is/image": "0.
|
|
74
|
-
"@webstudio-is/sdk": "0.
|
|
75
|
-
"@webstudio-is/sdk
|
|
76
|
-
"@webstudio-is/sdk-components-
|
|
77
|
-
"@webstudio-is/sdk-components-react-
|
|
78
|
-
"@webstudio-is/react
|
|
79
|
-
"@webstudio-is/sdk-components-react-router": "0.
|
|
80
|
-
"@webstudio-is/
|
|
81
|
-
"@webstudio-is/
|
|
73
|
+
"@webstudio-is/css-engine": "0.219.0",
|
|
74
|
+
"@webstudio-is/http-client": "0.219.0",
|
|
75
|
+
"@webstudio-is/image": "0.219.0",
|
|
76
|
+
"@webstudio-is/react-sdk": "0.219.0",
|
|
77
|
+
"@webstudio-is/sdk": "0.219.0",
|
|
78
|
+
"@webstudio-is/sdk-components-animation": "0.219.0",
|
|
79
|
+
"@webstudio-is/sdk-components-react-radix": "0.219.0",
|
|
80
|
+
"@webstudio-is/sdk-components-react": "0.219.0",
|
|
81
|
+
"@webstudio-is/sdk-components-react-router": "0.219.0",
|
|
82
|
+
"@webstudio-is/sdk-components-react-remix": "0.219.0",
|
|
83
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
82
84
|
},
|
|
83
85
|
"scripts": {
|
|
84
86
|
"typecheck": "tsc",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"build-cf-types": "wrangler types"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@remix-run/cloudflare": "2.16.
|
|
16
|
-
"@remix-run/cloudflare-pages": "2.16.
|
|
15
|
+
"@remix-run/cloudflare": "2.16.5",
|
|
16
|
+
"@remix-run/cloudflare-pages": "2.16.5"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@cloudflare/workers-types": "^4.20240620.0",
|
|
@@ -8,26 +8,26 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@remix-run/node": "2.16.
|
|
12
|
-
"@remix-run/react": "2.16.
|
|
13
|
-
"@remix-run/server-runtime": "2.16.
|
|
14
|
-
"@webstudio-is/image": "0.
|
|
15
|
-
"@webstudio-is/react-sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
20
|
-
"@webstudio-is/sdk-components-react-remix": "0.
|
|
11
|
+
"@remix-run/node": "2.16.5",
|
|
12
|
+
"@remix-run/react": "2.16.5",
|
|
13
|
+
"@remix-run/server-runtime": "2.16.5",
|
|
14
|
+
"@webstudio-is/image": "0.219.0",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.219.0",
|
|
16
|
+
"@webstudio-is/sdk": "0.219.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.219.0",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.219.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.219.0",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.219.0",
|
|
21
21
|
"isbot": "^5.1.25",
|
|
22
22
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
23
23
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@remix-run/dev": "2.16.
|
|
26
|
+
"@remix-run/dev": "2.16.5",
|
|
27
27
|
"@types/react": "^18.2.70",
|
|
28
28
|
"@types/react-dom": "^18.2.25",
|
|
29
29
|
"typescript": "5.8.2",
|
|
30
|
-
"vite": "^
|
|
30
|
+
"vite": "^6.3.4"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=20.0.0"
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@react-router/dev": "^7.5.
|
|
12
|
-
"@react-router/fs-routes": "^7.5.
|
|
13
|
-
"@webstudio-is/image": "0.
|
|
14
|
-
"@webstudio-is/react-sdk": "0.
|
|
15
|
-
"@webstudio-is/sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-react-router": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
11
|
+
"@react-router/dev": "^7.5.3",
|
|
12
|
+
"@react-router/fs-routes": "^7.5.3",
|
|
13
|
+
"@webstudio-is/image": "0.219.0",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.219.0",
|
|
15
|
+
"@webstudio-is/sdk": "0.219.0",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.219.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.219.0",
|
|
18
|
+
"@webstudio-is/sdk-components-react-router": "0.219.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.219.0",
|
|
20
20
|
"isbot": "^5.1.25",
|
|
21
21
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
22
22
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
23
|
-
"react-router": "^7.5.
|
|
24
|
-
"vite": "^
|
|
23
|
+
"react-router": "^7.5.3",
|
|
24
|
+
"vite": "^6.3.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^18.2.70",
|
|
@@ -3,4 +3,12 @@ import { reactRouter } from "@react-router/dev/vite";
|
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
5
|
plugins: [reactRouter()],
|
|
6
|
+
resolve: {
|
|
7
|
+
conditions: ["browser", "development|production"],
|
|
8
|
+
},
|
|
9
|
+
ssr: {
|
|
10
|
+
resolve: {
|
|
11
|
+
conditions: ["node", "development|production"],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
6
14
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We use mjs extension as constants in this file is shared with the build script
|
|
3
|
+
* and we use `node --eval` to extract the constants.
|
|
4
|
+
*/
|
|
5
|
+
export const assetBaseUrl = "/assets/";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @type {import("@webstudio-is/image").ImageLoader}
|
|
9
|
+
*/
|
|
10
|
+
export const imageLoader = (props) => {
|
|
11
|
+
if (import.meta.env.DEV) {
|
|
12
|
+
return props.src;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (props.format === "raw") {
|
|
16
|
+
return props.src;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// @todo https://developers.cloudflare.com/images/transform-images/transform-via-url/
|
|
20
|
+
return props.src;
|
|
21
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AppLoadContext, EntryContext } from "react-router";
|
|
2
|
+
import { ServerRouter } from "react-router";
|
|
3
|
+
import { isbot } from "isbot";
|
|
4
|
+
import { renderToReadableStream } from "react-dom/server";
|
|
5
|
+
|
|
6
|
+
export default async function handleRequest(
|
|
7
|
+
request: Request,
|
|
8
|
+
responseStatusCode: number,
|
|
9
|
+
responseHeaders: Headers,
|
|
10
|
+
routerContext: EntryContext,
|
|
11
|
+
_loadContext: AppLoadContext
|
|
12
|
+
) {
|
|
13
|
+
let shellRendered = false;
|
|
14
|
+
const userAgent = request.headers.get("user-agent");
|
|
15
|
+
|
|
16
|
+
const body = await renderToReadableStream(
|
|
17
|
+
<ServerRouter context={routerContext} url={request.url} />,
|
|
18
|
+
{
|
|
19
|
+
onError(error: unknown) {
|
|
20
|
+
responseStatusCode = 500;
|
|
21
|
+
// Log streaming rendering errors from inside the shell. Don't log
|
|
22
|
+
// errors encountered during initial shell rendering since they'll
|
|
23
|
+
// reject and get logged in handleDocumentRequest.
|
|
24
|
+
if (shellRendered) {
|
|
25
|
+
console.error(error);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
shellRendered = true;
|
|
31
|
+
|
|
32
|
+
// Ensure requests from bots and SPA Mode renders wait for all content to load before responding
|
|
33
|
+
// https://react.dev/reference/react-dom/server/renderToPipeableStream#waiting-for-all-content-to-load-for-crawlers-and-static-generation
|
|
34
|
+
if ((userAgent && isbot(userAgent)) || routerContext.isSpaMode) {
|
|
35
|
+
await body.allReady;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
responseHeaders.set("Content-Type", "text/html");
|
|
39
|
+
return new Response(body, {
|
|
40
|
+
headers: responseHeaders,
|
|
41
|
+
status: responseStatusCode,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"typecheck": "wrangler types && tsc",
|
|
4
|
+
"typegen": "wrangler types",
|
|
5
|
+
"preview": "react-router build && vite preview",
|
|
6
|
+
"deploy": "react-router build && wrangler deploy"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@cloudflare/vite-plugin": "^1.1.0",
|
|
10
|
+
"wrangler": "^4.14.1"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"include": ["**/*.ts", "**/*.tsx", "**/*.mjs"],
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
5
|
+
"types": [
|
|
6
|
+
"./worker-configuration.d.ts",
|
|
7
|
+
"vite/client",
|
|
8
|
+
"@webstudio-is/react-sdk/placeholder"
|
|
9
|
+
],
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"jsx": "react-jsx",
|
|
13
|
+
"module": "ESNext",
|
|
14
|
+
"moduleResolution": "bundler",
|
|
15
|
+
"target": "ES2022",
|
|
16
|
+
"strict": true,
|
|
17
|
+
"allowJs": true,
|
|
18
|
+
"forceConsistentCasingInFileNames": true,
|
|
19
|
+
"noEmit": true,
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"customConditions": ["webstudio"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import { cloudflare } from "@cloudflare/vite-plugin";
|
|
3
|
+
import { reactRouter } from "@react-router/dev/vite";
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [cloudflare({ viteEnvironment: { name: "ssr" } }), reactRouter()],
|
|
7
|
+
resolve: {
|
|
8
|
+
conditions: ["browser", "development|production"],
|
|
9
|
+
},
|
|
10
|
+
ssr: {
|
|
11
|
+
resolve: {
|
|
12
|
+
conditions: ["node", "development|production"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRequestHandler } from "react-router";
|
|
2
|
+
|
|
3
|
+
declare module "react-router" {
|
|
4
|
+
export interface AppLoadContext {
|
|
5
|
+
cloudflare: {
|
|
6
|
+
env: Env;
|
|
7
|
+
ctx: ExecutionContext;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const requestHandler = createRequestHandler(
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
() => import("virtual:react-router/server-build"),
|
|
15
|
+
import.meta.env.MODE
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
async fetch(request, env, ctx) {
|
|
20
|
+
return requestHandler(request, {
|
|
21
|
+
EXCLUDE_FROM_SEARCH: false,
|
|
22
|
+
getDefaultActionResource: undefined,
|
|
23
|
+
cloudflare: { env, ctx },
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
} satisfies ExportedHandler<Env>;
|
|
@@ -4,4 +4,12 @@ import netlifyPlugin from "@netlify/vite-plugin-react-router";
|
|
|
4
4
|
|
|
5
5
|
export default defineConfig({
|
|
6
6
|
plugins: [reactRouter(), netlifyPlugin()],
|
|
7
|
+
resolve: {
|
|
8
|
+
conditions: ["browser", "development|production"],
|
|
9
|
+
},
|
|
10
|
+
ssr: {
|
|
11
|
+
resolve: {
|
|
12
|
+
conditions: ["node", "development|production"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
7
15
|
});
|
|
@@ -25,11 +25,11 @@ const conditions = hasPrivateFolders
|
|
|
25
25
|
|
|
26
26
|
export default defineConfig(({ mode }) => ({
|
|
27
27
|
resolve: {
|
|
28
|
-
conditions,
|
|
28
|
+
conditions: [...conditions, "browser", "development|production"],
|
|
29
29
|
},
|
|
30
30
|
ssr: {
|
|
31
31
|
resolve: {
|
|
32
|
-
conditions,
|
|
32
|
+
conditions: [...conditions, "node", "development|production"],
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
plugins: [
|
|
@@ -20,11 +20,14 @@ export const Head = ({ data }: { data: PageContext["data"] }) => {
|
|
|
20
20
|
let socialImageUrl = pageMeta.socialImageUrl;
|
|
21
21
|
if (pageMeta.socialImageAssetName) {
|
|
22
22
|
socialImageUrl = `${origin}${imageLoader({
|
|
23
|
-
src: pageMeta.socialImageAssetName
|
|
23
|
+
src: `${assetBaseUrl}/${pageMeta.socialImageAssetName}`,
|
|
24
24
|
// Do not transform social image (not enough information do we need to do this)
|
|
25
25
|
format: "raw",
|
|
26
26
|
})}`;
|
|
27
27
|
}
|
|
28
|
+
const isTwitterCardSizeDefined = pageMeta.custom.some(
|
|
29
|
+
(meta) => meta.property === "twitter:card"
|
|
30
|
+
);
|
|
28
31
|
return (
|
|
29
32
|
<>
|
|
30
33
|
{data.url && <meta property="og:url" content={data.url} />}
|
|
@@ -55,6 +58,11 @@ export const Head = ({ data }: { data: PageContext["data"] }) => {
|
|
|
55
58
|
{pageMeta.custom.map(({ property, content }) => (
|
|
56
59
|
<meta key={property} property={property} content={content} />
|
|
57
60
|
))}
|
|
61
|
+
{(pageMeta.socialImageAssetName !== undefined ||
|
|
62
|
+
pageMeta.socialImageUrl !== undefined) &&
|
|
63
|
+
isTwitterCardSizeDefined === false && (
|
|
64
|
+
<meta property="twitter:card" content="summary_large_image" />
|
|
65
|
+
)}
|
|
58
66
|
|
|
59
67
|
{favIconAsset && (
|
|
60
68
|
<link
|
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@webstudio-is/image": "0.
|
|
12
|
-
"@webstudio-is/react-sdk": "0.
|
|
13
|
-
"@webstudio-is/sdk": "0.
|
|
14
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
15
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
16
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
11
|
+
"@webstudio-is/image": "0.219.0",
|
|
12
|
+
"@webstudio-is/react-sdk": "0.219.0",
|
|
13
|
+
"@webstudio-is/sdk": "0.219.0",
|
|
14
|
+
"@webstudio-is/sdk-components-react": "0.219.0",
|
|
15
|
+
"@webstudio-is/sdk-components-animation": "0.219.0",
|
|
16
|
+
"@webstudio-is/sdk-components-react-radix": "0.219.0",
|
|
17
17
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
18
18
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
19
|
-
"vike": "^0.4.
|
|
19
|
+
"vike": "^0.4.229"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^18.2.70",
|
|
23
23
|
"@types/react-dom": "^18.2.25",
|
|
24
|
-
"@vitejs/plugin-react": "^4.
|
|
24
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
25
25
|
"typescript": "5.8.2",
|
|
26
|
-
"vite": "^
|
|
26
|
+
"vite": "^6.3.4"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=20.0.0"
|
|
@@ -4,4 +4,12 @@ import vike from "vike/plugin";
|
|
|
4
4
|
|
|
5
5
|
export default defineConfig({
|
|
6
6
|
plugins: [react(), vike({ prerender: true })],
|
|
7
|
+
resolve: {
|
|
8
|
+
conditions: ["browser", "development|production"],
|
|
9
|
+
},
|
|
10
|
+
ssr: {
|
|
11
|
+
resolve: {
|
|
12
|
+
conditions: ["node", "development|production"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
7
15
|
});
|