diff --git a/examples/apollo/package.json b/examples/apollo/package.json index 465fc57e..5e93f2ba 100644 --- a/examples/apollo/package.json +++ b/examples/apollo/package.json @@ -11,7 +11,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.3.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vike-react-apollo": "^0.1.1", "@apollo/client": "^3.10.8", diff --git a/examples/full/package.json b/examples/full/package.json index 6661629f..fef6872a 100644 --- a/examples/full/package.json +++ b/examples/full/package.json @@ -13,7 +13,7 @@ "react-dom": "^18.3.1", "react-streaming": "^0.3.43", "typescript": "^5.5.4", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vite": "^5.4.0" }, diff --git a/examples/react-query/package.json b/examples/react-query/package.json index d92df817..a43b8c89 100644 --- a/examples/react-query/package.json +++ b/examples/react-query/package.json @@ -10,7 +10,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.5.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vike-react-query": "^0.1.3", "@tanstack/react-query": "^5.20.1", diff --git a/packages/vike-react-antd/Wrapper.tsx b/packages/vike-react-antd/Wrapper.server.tsx similarity index 72% rename from packages/vike-react-antd/Wrapper.tsx rename to packages/vike-react-antd/Wrapper.server.tsx index 12c26bbb..2812ffdd 100644 --- a/packages/vike-react-antd/Wrapper.tsx +++ b/packages/vike-react-antd/Wrapper.server.tsx @@ -7,14 +7,13 @@ import { usePageContext } from 'vike-react/usePageContext' function Wrapper({ children }: { children: ReactNode }) { const pageContext = usePageContext() const { antd } = pageContext.config - const cache = 'antd' in pageContext ? pageContext.antd?.cache : undefined - if (antd === null || !cache) { + if (antd === null) { return <>{children} } return ( - + {children} ) diff --git a/packages/vike-react-antd/config.ts b/packages/vike-react-antd/config.ts index 1118ace2..922e3dc4 100644 --- a/packages/vike-react-antd/config.ts +++ b/packages/vike-react-antd/config.ts @@ -6,16 +6,13 @@ import type { Config } from 'vike/types' const config = { name: 'vike-react-antd', require: { - vike: '>=0.4.203', + vike: '>=0.4.211', 'vike-react': '>=0.4.13', }, onAfterRenderHtml: 'import:vike-react-antd/__internal/onAfterRenderHtml:onAfterRenderHtml', onBeforeRenderHtml: 'import:vike-react-antd/__internal/onBeforeRenderHtml:onBeforeRenderHtml', Wrapper: 'import:vike-react-antd/__internal/Wrapper:Wrapper', meta: { - Wrapper: { - env: { server: true }, - }, antd: { env: { server: true, diff --git a/packages/vike-react-antd/package.json b/packages/vike-react-antd/package.json index e272dcf8..b83af7d2 100644 --- a/packages/vike-react-antd/package.json +++ b/packages/vike-react-antd/package.json @@ -6,7 +6,7 @@ "./config": "./dist/config.js", "./__internal/onAfterRenderHtml": "./dist/onAfterRenderHtml.js", "./__internal/onBeforeRenderHtml": "./dist/onBeforeRenderHtml.js", - "./__internal/Wrapper": "./dist/Wrapper.js" + "./__internal/Wrapper": "./dist/Wrapper.server.js" }, "scripts": { "dev": "tsc --watch", @@ -30,7 +30,7 @@ "react": "^18.3.1", "rimraf": "^5.0.5", "typescript": "^5.5.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vite": "^5.4.0" }, @@ -46,7 +46,7 @@ "dist/onBeforeRenderHtml.d.ts" ], "__internal/Wrapper": [ - "dist/Wrapper.d.ts" + "dist/Wrapper.server.d.ts" ] } }, diff --git a/packages/vike-react-apollo/package.json b/packages/vike-react-apollo/package.json index fb884374..d2763bbe 100644 --- a/packages/vike-react-apollo/package.json +++ b/packages/vike-react-apollo/package.json @@ -38,7 +38,7 @@ "react-streaming": "^0.3.43", "rimraf": "^5.0.5", "typescript": "^5.3.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vite": "^5.4.0" }, diff --git a/packages/vike-react-chakra/package.json b/packages/vike-react-chakra/package.json index b7920096..fdc99645 100644 --- a/packages/vike-react-chakra/package.json +++ b/packages/vike-react-chakra/package.json @@ -28,7 +28,7 @@ "react": "^18.3.1", "rimraf": "^5.0.5", "typescript": "^5.5.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vite": "^5.4.0" }, diff --git a/packages/vike-react-query/package.json b/packages/vike-react-query/package.json index de6cd2dd..1e15b55e 100644 --- a/packages/vike-react-query/package.json +++ b/packages/vike-react-query/package.json @@ -35,7 +35,7 @@ "react-streaming": "^0.3.43", "rimraf": "^5.0.5", "typescript": "^5.5.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vite": "^5.4.0", "vitest": "^1.2.2" diff --git a/packages/vike-react-styled-components/Wrapper.tsx b/packages/vike-react-styled-components/Wrapper.server.tsx similarity index 64% rename from packages/vike-react-styled-components/Wrapper.tsx rename to packages/vike-react-styled-components/Wrapper.server.tsx index 72d69bfc..3dad9351 100644 --- a/packages/vike-react-styled-components/Wrapper.tsx +++ b/packages/vike-react-styled-components/Wrapper.server.tsx @@ -7,14 +7,13 @@ import { usePageContext } from 'vike-react/usePageContext' function Wrapper({ children }: { children: ReactNode }) { const pageContext = usePageContext() const { styledComponents } = pageContext.config - const sheet = 'styledComponents' in pageContext ? pageContext.styledComponents?.sheet : undefined - if (styledComponents === null || !sheet) { + if (styledComponents === null) { return <>{children} } return ( - + {children} ) diff --git a/packages/vike-react-styled-components/config.ts b/packages/vike-react-styled-components/config.ts index 17396bd5..9874b53d 100644 --- a/packages/vike-react-styled-components/config.ts +++ b/packages/vike-react-styled-components/config.ts @@ -6,16 +6,13 @@ import type { Config } from 'vike/types' const config = { name: 'vike-react-styled-components', require: { - vike: '>=0.4.203', + vike: '>=0.4.211', 'vike-react': '>=0.4.13', }, onAfterRenderHtml: 'import:vike-react-styled-components/__internal/onAfterRenderHtml:onAfterRenderHtml', onBeforeRenderHtml: 'import:vike-react-styled-components/__internal/onBeforeRenderHtml:onBeforeRenderHtml', Wrapper: 'import:vike-react-styled-components/__internal/Wrapper:Wrapper', meta: { - Wrapper: { - env: { server: true }, - }, styledComponents: { env: { server: true, diff --git a/packages/vike-react-styled-components/package.json b/packages/vike-react-styled-components/package.json index 2c1aabbf..7dff366a 100644 --- a/packages/vike-react-styled-components/package.json +++ b/packages/vike-react-styled-components/package.json @@ -6,7 +6,7 @@ "./config": "./dist/config.js", "./__internal/onAfterRenderHtml": "./dist/onAfterRenderHtml.js", "./__internal/onBeforeRenderHtml": "./dist/onBeforeRenderHtml.js", - "./__internal/Wrapper": "./dist/Wrapper.js" + "./__internal/Wrapper": "./dist/Wrapper.server.js" }, "scripts": { "dev": "tsc --watch", @@ -28,7 +28,7 @@ "rimraf": "^5.0.5", "styled-components": "^6.1.13", "typescript": "^5.5.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vite": "^5.4.0" }, @@ -44,7 +44,7 @@ "dist/onBeforeRenderHtml.d.ts" ], "__internal/Wrapper": [ - "dist/Wrapper.d.ts" + "dist/Wrapper.server.d.ts" ] } }, diff --git a/packages/vike-react-styled-jsx/Wrapper.tsx b/packages/vike-react-styled-jsx/Wrapper.server.tsx similarity index 62% rename from packages/vike-react-styled-jsx/Wrapper.tsx rename to packages/vike-react-styled-jsx/Wrapper.server.tsx index e54b7745..76a3f287 100644 --- a/packages/vike-react-styled-jsx/Wrapper.tsx +++ b/packages/vike-react-styled-jsx/Wrapper.server.tsx @@ -7,11 +7,10 @@ import { usePageContext } from 'vike-react/usePageContext' function Wrapper({ children }: { children: ReactNode }) { const pageContext = usePageContext() const { styledJsx } = pageContext.config - const registry = 'styledJsx' in pageContext ? pageContext.styledJsx?.registry : undefined - if (styledJsx === null || !registry) { + if (styledJsx === null) { return <>{children} } - return {children} + return {children} } diff --git a/packages/vike-react-styled-jsx/config.ts b/packages/vike-react-styled-jsx/config.ts index dfcbb2fb..8aa50c68 100644 --- a/packages/vike-react-styled-jsx/config.ts +++ b/packages/vike-react-styled-jsx/config.ts @@ -6,7 +6,7 @@ import type { StyledJsxStyleRegistry } from 'styled-jsx' const config = { name: 'vike-react-styled-jsx', require: { - vike: '>=0.4.203', + vike: '>=0.4.211', 'vike-react': '>=0.4.13', }, onBeforeRenderHtml: 'import:vike-react-styled-jsx/__internal/onBeforeRenderHtml:onBeforeRenderHtml', @@ -16,9 +16,6 @@ const config = { styledJsx: { env: { server: true }, }, - Wrapper: { - env: { server: true }, - }, }, } satisfies Config diff --git a/packages/vike-react-styled-jsx/package.json b/packages/vike-react-styled-jsx/package.json index fcc70f93..e1e6b0c1 100644 --- a/packages/vike-react-styled-jsx/package.json +++ b/packages/vike-react-styled-jsx/package.json @@ -6,7 +6,7 @@ "./config": "./dist/config.js", "./__internal/onAfterRenderHtml": "./dist/onAfterRenderHtml.js", "./__internal/onBeforeRenderHtml": "./dist/onBeforeRenderHtml.js", - "./__internal/Wrapper": "./dist/Wrapper.js" + "./__internal/Wrapper": "./dist/Wrapper.server.js" }, "scripts": { "dev": "tsc --watch", @@ -28,7 +28,7 @@ "rimraf": "^5.0.5", "styled-jsx": "^5.1.6", "typescript": "^5.5.3", - "vike": "^0.4.203", + "vike": "^0.4.211", "vike-react": "^0.5.11", "vite": "^5.4.0" }, @@ -44,7 +44,7 @@ "dist/onBeforeRenderHtml.d.ts" ], "__internal/Wrapper": [ - "dist/Wrapper.d.ts" + "dist/Wrapper.server.d.ts" ] } }, diff --git a/packages/vike-react/package.json b/packages/vike-react/package.json index 147246f3..1f78cb6f 100644 --- a/packages/vike-react/package.json +++ b/packages/vike-react/package.json @@ -53,7 +53,7 @@ "react-streaming": "^0.3.43", "rimraf": "^5.0.5", "typescript": "^5.5.4", - "vike": "^0.4.203", + "vike": "^0.4.211", "vite": "^5.4.0" }, "typesVersions": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4286aca0..db2121dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: ^5.3.3 version: 5.5.3 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../../packages/vike-react version: link:../../packages/vike-react @@ -102,8 +102,8 @@ importers: specifier: ^5.5.4 version: 5.5.4 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../../packages/vike-react version: link:../../packages/vike-react @@ -156,8 +156,8 @@ importers: specifier: ^5.5.3 version: 5.5.3 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../../packages/vike-react version: link:../../packages/vike-react @@ -202,8 +202,8 @@ importers: specifier: ^5.5.4 version: 5.5.4 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vite: specifier: ^5.4.0 version: 5.4.0(@types/node@20.11.17) @@ -232,8 +232,8 @@ importers: specifier: ^5.5.3 version: 5.5.4 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../vike-react version: link:../vike-react @@ -284,8 +284,8 @@ importers: specifier: ^5.3.3 version: 5.5.3 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../vike-react version: link:../vike-react @@ -317,8 +317,8 @@ importers: specifier: ^5.5.3 version: 5.5.4 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../vike-react version: link:../vike-react @@ -366,8 +366,8 @@ importers: specifier: ^5.5.3 version: 5.5.3 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../vike-react version: link:../vike-react @@ -399,8 +399,8 @@ importers: specifier: ^5.5.3 version: 5.5.4 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../vike-react version: link:../vike-react @@ -429,8 +429,8 @@ importers: specifier: ^5.5.3 version: 5.5.4 vike: - specifier: ^0.4.203 - version: 0.4.203(react-streaming@0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) + specifier: ^0.4.211 + version: 0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)) vike-react: specifier: link:../vike-react version: link:../vike-react @@ -830,6 +830,9 @@ packages: '@brillout/json-serializer@0.5.13': resolution: {integrity: sha512-9FpmgpuoSISw6fAPVB2qwW1dGAADN28YbWpfwOErfcZxpBH4lsnejuY89qcivInnWXYJvyyPwghCuOTbtuaYFg==} + '@brillout/json-serializer@0.5.15': + resolution: {integrity: sha512-iLAyV1HNC3nG07ypBwCJohFrajY1HeZdfBBgGuRtMH/JPddgG9bPmoSI18A1RBx67vRmY6/8rgisjR5YfTvZHA==} + '@brillout/part-regex@0.1.3': resolution: {integrity: sha512-ZyqtOYHvQs3Ca0xt9fb2OlGzCrKwXtMcAATDObkFmI4jKuObEORjWrqAslWTelquXlyEYLz7h1nt6jp50LDyJA==} @@ -865,6 +868,9 @@ packages: '@brillout/vite-plugin-server-entry@0.5.1': resolution: {integrity: sha512-ZoXt8D/Z1E6e8ylKm5z8VzuxtIqPfLoWvsKkeK08LIpfCnRMxRJQLBZ1i3s9gGxE5+PvzY2dU5pBr7dL9aM8bg==} + '@brillout/vite-plugin-server-entry@0.5.6': + resolution: {integrity: sha512-lxgvTQhQBucZehhkvq9x2C7IUfrkAhp+YkW8S0MVR5EYkf6EWBg+bYZWB0//mDfbmUcc8aAEe3uRto7pOg35Ig==} + '@chakra-ui/react@3.0.2': resolution: {integrity: sha512-xfW0tGCLJSvNkMFrz4zyjvImugwVb4gYvsGOT9hISMhDvh20ciS3WEI8S+jia4ytkl5yI4H0KPyuMjQt/gM69Q==} peerDependencies: @@ -3614,6 +3620,17 @@ packages: react-streaming: optional: true + vike@0.4.211: + resolution: {integrity: sha512-W7HbzTqwuIhLm/HmOl5rjCX4ZuOhxTgI/h0bqBkVOeCwrO8Ixo545oQJeXQ+3MojpDThLQFMeBvwdN9T03wVrw==} + engines: {node: '>=18.0.0'} + hasBin: true + peerDependencies: + react-streaming: '>=0.3.42' + vite: '>=5.1.0' + peerDependenciesMeta: + react-streaming: + optional: true + vite-node@1.2.2: resolution: {integrity: sha512-1as4rDTgVWJO3n1uHmUYqq7nsFgINQ9u+mRcXpjeOMJUmviqNKjcZB7UfRZrlM7MjYXMKpuWp5oGkjaFLnjawg==} engines: {node: ^18.0.0 || >=20.0.0} @@ -4307,6 +4324,8 @@ snapshots: '@brillout/json-serializer@0.5.13': {} + '@brillout/json-serializer@0.5.15': {} + '@brillout/part-regex@0.1.3': {} '@brillout/picocolors@1.0.10': {} @@ -4354,6 +4373,11 @@ snapshots: dependencies: '@brillout/import': 0.2.3 + '@brillout/vite-plugin-server-entry@0.5.6': + dependencies: + '@brillout/import': 0.2.3 + '@brillout/picocolors': 1.0.15 + '@chakra-ui/react@3.0.2(@emotion/react@11.13.3(@types/react@18.3.3)(react@18.3.1))(@internationalized/date@3.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ark-ui/anatomy': 3.5.0(@internationalized/date@3.5.6) @@ -7732,6 +7756,24 @@ snapshots: optionalDependencies: react-streaming: 0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + vike@0.4.211(react-streaming@0.3.43(react@18.3.1))(vite@5.4.0(@types/node@20.11.17)): + dependencies: + '@brillout/import': 0.2.3 + '@brillout/json-serializer': 0.5.15 + '@brillout/picocolors': 1.0.15 + '@brillout/require-shim': 0.1.2 + '@brillout/vite-plugin-server-entry': 0.5.6 + acorn: 8.11.2 + cac: 6.7.14 + es-module-lexer: 1.4.1 + esbuild: 0.21.5 + fast-glob: 3.3.2 + semver: 7.6.2 + source-map-support: 0.5.21 + vite: 5.4.0(@types/node@20.11.17) + optionalDependencies: + react-streaming: 0.3.43(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + vite-node@1.2.2(@types/node@20.11.17): dependencies: cac: 6.7.14