File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,18 @@ export default function vitePluginRsc(
265
265
...result . ssr . noExternal . sort ( ) ,
266
266
]
267
267
268
+ // vendor and optimize use-sync-external-store since
269
+ // this is a common transitive cjs dep, which tends to cause a cryptic error.
270
+ const vendorDeps = [
271
+ `${ PKG_NAME } /vendor/use-sync-external-store` ,
272
+ `${ PKG_NAME } /vendor/use-sync-external-store/with-selector` ,
273
+ `${ PKG_NAME } /vendor/use-sync-external-store/with-selector.js` ,
274
+ `${ PKG_NAME } /vendor/use-sync-external-store/shim` ,
275
+ `${ PKG_NAME } /vendor/use-sync-external-store/shim/index.js` ,
276
+ `${ PKG_NAME } /vendor/use-sync-external-store/shim/with-selector` ,
277
+ `${ PKG_NAME } /vendor/use-sync-external-store/shim/with-selector.js` ,
278
+ ]
279
+
268
280
return {
269
281
appType : 'custom' ,
270
282
define : {
@@ -311,6 +323,7 @@ export default function vitePluginRsc(
311
323
'react/jsx-dev-runtime' ,
312
324
'react-dom/server.edge' ,
313
325
`${ REACT_SERVER_DOM_NAME } /client.edge` ,
326
+ ...vendorDeps ,
314
327
] ,
315
328
exclude : [ PKG_NAME ] ,
316
329
} ,
You can’t perform that action at this time.
0 commit comments