@vitejs/plugin-rsc 0.5.20 → 0.5.21
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/plugin.js +7 -2
- package/package.json +3 -3
package/dist/plugin.js
CHANGED
|
@@ -190,6 +190,11 @@ function vitePluginRsc(rscPluginOptions = {}) {
|
|
|
190
190
|
PKG_NAME,
|
|
191
191
|
...result.ssr.noExternal.sort()
|
|
192
192
|
];
|
|
193
|
+
const optimizeDepsExclude = noExternal.filter((pkg) => ![
|
|
194
|
+
"react",
|
|
195
|
+
"react-dom",
|
|
196
|
+
"react-server-dom-webpack"
|
|
197
|
+
].includes(pkg));
|
|
193
198
|
hasReactServerDomWebpack = result.ssr.noExternal.includes("react-server-dom-webpack");
|
|
194
199
|
const reactServerDomPackageName = hasReactServerDomWebpack ? "react-server-dom-webpack" : REACT_SERVER_DOM_NAME;
|
|
195
200
|
return {
|
|
@@ -223,7 +228,7 @@ function vitePluginRsc(rscPluginOptions = {}) {
|
|
|
223
228
|
"react-dom/static.edge",
|
|
224
229
|
`${reactServerDomPackageName}/client.edge`
|
|
225
230
|
],
|
|
226
|
-
exclude: [PKG_NAME]
|
|
231
|
+
exclude: [PKG_NAME, ...optimizeDepsExclude]
|
|
227
232
|
}
|
|
228
233
|
},
|
|
229
234
|
rsc: {
|
|
@@ -246,7 +251,7 @@ function vitePluginRsc(rscPluginOptions = {}) {
|
|
|
246
251
|
`${reactServerDomPackageName}/server.edge`,
|
|
247
252
|
`${reactServerDomPackageName}/client.edge`
|
|
248
253
|
],
|
|
249
|
-
exclude: [PKG_NAME]
|
|
254
|
+
exclude: [PKG_NAME, ...optimizeDepsExclude]
|
|
250
255
|
}
|
|
251
256
|
}
|
|
252
257
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-rsc",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"description": "React Server Components (RSC) support for Vite.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"prepack": "tsdown"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@rolldown/pluginutils": "1.0.0-rc.
|
|
42
|
+
"@rolldown/pluginutils": "1.0.0-rc.5",
|
|
43
43
|
"es-module-lexer": "^2.0.0",
|
|
44
44
|
"estree-walker": "^3.0.3",
|
|
45
45
|
"magic-string": "^0.30.21",
|
|
46
46
|
"periscopic": "^4.0.2",
|
|
47
|
-
"srvx": "^0.11.
|
|
47
|
+
"srvx": "^0.11.7",
|
|
48
48
|
"strip-literal": "^3.1.0",
|
|
49
49
|
"turbo-stream": "^3.1.0",
|
|
50
50
|
"vitefu": "^1.1.1"
|