File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -638,8 +638,16 @@ export default function vitePluginRsc(
638638 mergeAssetDeps ( deps , entry . deps ) ,
639639 )
640640 }
641+ let bootstrapScriptContent : string | RuntimeAsset
642+ if ( typeof entryUrl === 'string' ) {
643+ bootstrapScriptContent = `import(${ JSON . stringify ( entryUrl ) } )`
644+ } else {
645+ bootstrapScriptContent = new RuntimeAsset (
646+ `"import(" + JSON.stringify(${ entryUrl . runtime } ) + ")"` ,
647+ )
648+ }
641649 buildAssetsManifest = {
642- bootstrapScriptContent : `import( ${ serializeValueWithRuntime ( entryUrl ) } )` ,
650+ bootstrapScriptContent,
643651 clientReferenceDeps,
644652 serverResources,
645653 }
@@ -1346,7 +1354,7 @@ function assetsURLOfDeps(deps: AssetDeps) {
13461354//
13471355
13481356export type AssetsManifest = {
1349- bootstrapScriptContent : string
1357+ bootstrapScriptContent : string | RuntimeAsset
13501358 clientReferenceDeps : Record < string , AssetDeps >
13511359 serverResources ?: Record < string , Pick < AssetDeps , 'css' > >
13521360}
You can’t perform that action at this time.
0 commit comments