@vitejs/plugin-rsc 0.4.10-alpha.1 → 0.4.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/README.md
CHANGED
|
@@ -98,7 +98,6 @@ export default defineConfig({
|
|
|
98
98
|
// this environment is responsible for:
|
|
99
99
|
// - RSC stream deserialization (RSC stream -> React VDOM)
|
|
100
100
|
// - traditional SSR (React VDOM -> HTML string/stream)
|
|
101
|
-
// (NOTE: as it can be seen in the above diagram. SSR is technically an optional mechanism.)
|
|
102
101
|
ssr: {
|
|
103
102
|
build: {
|
|
104
103
|
rollupOptions: {
|
package/dist/extra/ssr.js
CHANGED
|
@@ -3,7 +3,7 @@ import "../shared-CEyKoKAb.js";
|
|
|
3
3
|
import "../ssr-BOIYlvSn.js";
|
|
4
4
|
import { createFromReadableStream } from "../ssr-D5pxP29F.js";
|
|
5
5
|
import "../ssr-Do_Ok_bB.js";
|
|
6
|
-
import { injectRSCPayload } from "../server-
|
|
6
|
+
import { injectRSCPayload } from "../server-DS3S6m0g.js";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import ReactDomServer from "react-dom/server.edge";
|
|
@@ -57,7 +57,7 @@ async function writeRSCStream(rscStream, controller, nonce) {
|
|
|
57
57
|
if (remaining.length) writeChunk(JSON.stringify(remaining), controller, nonce);
|
|
58
58
|
}
|
|
59
59
|
function writeChunk(chunk, controller, nonce) {
|
|
60
|
-
controller.enqueue(encoder.encode(`<script${nonce ? ` nonce="${nonce}"` : ""}>${escapeScript(`(self.__FLIGHT_DATA||=[]).push(${chunk})`)}
|
|
60
|
+
controller.enqueue(encoder.encode(`<script${nonce ? ` nonce="${nonce}"` : ""}>${escapeScript(`(self.__FLIGHT_DATA||=[]).push(${chunk})`)}<\/script>`));
|
|
61
61
|
}
|
|
62
62
|
function escapeScript(script) {
|
|
63
63
|
return script.replace(/<!--/g, "<\\!--").replace(/<\/(script)/gi, "</\\$1");
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-rsc",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
|
+
"description": "React Server Components (RSC) support for Vite.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vite",
|
|
7
|
+
"vite-plugin",
|
|
8
|
+
"react",
|
|
9
|
+
"react-server-components",
|
|
10
|
+
"rsc"
|
|
11
|
+
],
|
|
4
12
|
"homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc",
|
|
5
13
|
"repository": {
|
|
6
14
|
"type": "git",
|
|
@@ -23,32 +31,30 @@
|
|
|
23
31
|
"test": "vitest",
|
|
24
32
|
"test-e2e": "playwright test --project=chromium",
|
|
25
33
|
"test-e2e-ci": "playwright test",
|
|
26
|
-
"test-package": "bash scripts/test-package.sh",
|
|
27
34
|
"tsc": "tsc -b ./tsconfig.json ./e2e/tsconfig.json ./examples/*/tsconfig.json",
|
|
28
35
|
"tsc-dev": "pnpm tsc --watch --preserveWatchOutput",
|
|
29
|
-
"changelog": "pnpm dlx @hiogawa/changelog --repo https://github.com/vitejs/vite-plugin-react",
|
|
30
36
|
"dev": "tsdown --sourcemap --watch src",
|
|
31
37
|
"build": "tsdown",
|
|
32
|
-
"prepack": "tsdown
|
|
38
|
+
"prepack": "tsdown"
|
|
33
39
|
},
|
|
34
40
|
"dependencies": {
|
|
35
|
-
"@mjackson/node-fetch-server": "^0.
|
|
36
|
-
"es-module-lexer": "^1.
|
|
41
|
+
"@mjackson/node-fetch-server": "^0.7.0",
|
|
42
|
+
"es-module-lexer": "^1.7.0",
|
|
37
43
|
"estree-walker": "^3.0.3",
|
|
38
44
|
"magic-string": "^0.30.17",
|
|
39
45
|
"periscopic": "^4.0.2",
|
|
40
46
|
"turbo-stream": "^3.1.0",
|
|
41
|
-
"vitefu": "^1.
|
|
47
|
+
"vitefu": "^1.1.1"
|
|
42
48
|
},
|
|
43
49
|
"devDependencies": {
|
|
44
|
-
"@types/react": "^19.1.8",
|
|
45
|
-
"@types/react-dom": "^19.1.6",
|
|
46
|
-
"@vitejs/plugin-react": "workspace:*",
|
|
47
50
|
"@hiogawa/utils": "^1.7.0",
|
|
48
|
-
"@playwright/test": "^1.53.
|
|
51
|
+
"@playwright/test": "^1.53.2",
|
|
49
52
|
"@tsconfig/strictest": "^2.0.5",
|
|
50
53
|
"@types/estree": "^1.0.8",
|
|
51
|
-
"@types/node": "^22.
|
|
54
|
+
"@types/node": "^22.16.0",
|
|
55
|
+
"@types/react": "^19.1.8",
|
|
56
|
+
"@types/react-dom": "^19.1.6",
|
|
57
|
+
"@vitejs/plugin-react": "workspace:*",
|
|
52
58
|
"react": "^19.1.0",
|
|
53
59
|
"react-dom": "^19.1.0",
|
|
54
60
|
"react-server-dom-webpack": "^19.1.0",
|