@@ -759,23 +759,8 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
759759
760760 const addInjection = ( b : GlobalInjections ) => injections . push ( b ) ;
761761 const generateManifest = async ( ) => {
762- const optimizer = getOptimizer ( ) ;
762+ const manifest = assembleManifestData ( injections , rollupBundle ) ;
763763 const path = optimizer . sys . path ;
764-
765- const segments = Array . from ( clientResults . values ( ) )
766- . flatMap ( ( r ) => r . modules )
767- . map ( ( mod ) => mod . segment )
768- . filter ( ( h ) => ! ! h ) as SegmentAnalysis [ ] ;
769-
770- const manifest = generateManifestFromBundles (
771- path ,
772- segments ,
773- injections ,
774- rollupBundle ,
775- opts ,
776- debug
777- ) ;
778-
779764 for ( const symbol of Object . values ( manifest . symbols ) ) {
780765 if ( symbol . origin ) {
781766 symbol . origin = normalizePath ( symbol . origin ) ;
@@ -798,9 +783,26 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
798783 return manifest ;
799784 } ;
800785
786+ const collectServerRpcAndCtxKindSymbols = async ( ) => {
787+ const manifest = assembleManifestData ( injections , rollupBundle ) ;
788+ const path = optimizer . sys . path ;
789+ } ;
790+
801791 return { addInjection, generateManifest } ;
802792 } ;
803793
794+ const assembleManifestData = ( injections : GlobalInjections [ ] , rollupBundle : OutputBundle ) => {
795+ const optimizer = getOptimizer ( ) ;
796+ const path = optimizer . sys . path ;
797+
798+ const segments = Array . from ( clientResults . values ( ) )
799+ . flatMap ( ( r ) => r . modules )
800+ . map ( ( mod ) => mod . segment )
801+ . filter ( ( h ) => ! ! h ) as SegmentAnalysis [ ] ;
802+
803+ return generateManifestFromBundles ( path , segments , injections , rollupBundle , opts , debug ) ;
804+ } ;
805+
804806 const getOptions = ( ) => opts ;
805807
806808 const getTransformedOutputs = ( ) => {
0 commit comments