@@ -495,7 +495,7 @@ export default function markoPlugin(opts: Options = {}): vite.Plugin[] {
495
495
}
496
496
} ,
497
497
498
- async buildStart ( inputOptions ) {
498
+ async options ( inputOptions ) {
499
499
if ( isBuild && linked && ! isSSRBuild ) {
500
500
try {
501
501
serverManifest = await store . read ( ) ;
@@ -505,12 +505,6 @@ export default function markoPlugin(opts: Options = {}): vite.Plugin[] {
505
505
entryIds . add ( id ) ;
506
506
cachedSources . set ( id , serverManifest . entrySources [ entry ] ) ;
507
507
}
508
- for ( const assetId of serverManifest . ssrAssetIds ) {
509
- this . load ( {
510
- id : normalizePath ( path . resolve ( root , assetId ) ) ,
511
- resolveDependencies : false ,
512
- } ) . catch ( noop ) ;
513
- }
514
508
} catch ( err ) {
515
509
this . error (
516
510
`You must run the "ssr" build before the "browser" build.` ,
@@ -522,6 +516,16 @@ export default function markoPlugin(opts: Options = {}): vite.Plugin[] {
522
516
}
523
517
}
524
518
} ,
519
+ async buildStart ( ) {
520
+ if ( isBuild && linked && ! isSSRBuild ) {
521
+ for ( const assetId of serverManifest ! . ssrAssetIds ) {
522
+ this . load ( {
523
+ id : normalizePath ( path . resolve ( root , assetId ) ) ,
524
+ resolveDependencies : false ,
525
+ } ) . catch ( noop ) ;
526
+ }
527
+ }
528
+ } ,
525
529
async resolveId ( importee , importer , importOpts , ssr = importOpts . ssr ) {
526
530
if ( virtualFiles . has ( importee ) ) {
527
531
return importee ;
0 commit comments