@@ -264,7 +264,6 @@ class FederationDashboardPlugin {
264
264
265
265
if ( graphData ) {
266
266
const dashData = ( this . _dashData = JSON . stringify ( graphData ) ) ;
267
- this . writeStatsFiles ( stats , dashData ) ;
268
267
if ( this . _options . dashboardURL && ! this . _options . nextjs ) {
269
268
this . postDashboardData ( dashData ) . catch ( ( err ) => {
270
269
if ( err ) {
@@ -475,74 +474,6 @@ class FederationDashboardPlugin {
475
474
return Array . from ( directReasons ) ;
476
475
}
477
476
478
- // This is no longer needed - can be deleted or used for refactoring the asset emitter
479
- writeStatsFiles ( stats , dashData ) {
480
- if ( this . _options . filename ) {
481
- const hashPath = path . join ( stats . outputPath , this . _options . filename ) ;
482
- if ( ! fs . existsSync ( stats . outputPath ) ) {
483
- fs . mkdirSync ( stats . outputPath ) ;
484
- }
485
- fs . writeFile ( hashPath , dashData , { encoding : "utf-8" } , ( ) => { } ) ;
486
- }
487
- if ( this . _options . debug ) {
488
- console . log (
489
- path . join ( stats . outputPath , this . FederationPluginOptions . filename )
490
- ) ;
491
- }
492
- const file = fs . readFileSync (
493
- path . join ( stats . outputPath , this . FederationPluginOptions . filename )
494
- ) ;
495
- const { version } = JSON . parse ( dashData ) ;
496
- if ( ! version ) {
497
- throw new Error ( "no version provided, cannot version remote" ) ;
498
- }
499
- if ( this . _options . debug ) {
500
- console . log (
501
- path . join (
502
- stats . outputPath ,
503
- version ,
504
- this . FederationPluginOptions . filename
505
- )
506
- ) ;
507
- }
508
- fs . mkdir (
509
- path . join ( stats . outputPath , version ) ,
510
- { recursive : true } ,
511
- ( err ) => {
512
- if ( err ) throw err ;
513
- fs . writeFile (
514
- path . join (
515
- stats . outputPath ,
516
- version ,
517
- this . FederationPluginOptions . filename
518
- ) ,
519
- file ,
520
- ( err ) => {
521
- if ( this . _options . debug ) {
522
- console . trace ( err ) ;
523
- console . log (
524
- "wrote versioned remote" ,
525
- path . join (
526
- stats . outputPath ,
527
- version ,
528
- this . FederationPluginOptions . filename
529
- )
530
- ) ;
531
- }
532
- }
533
- ) ;
534
- }
535
- ) ;
536
-
537
- const statsPath = path . join ( stats . outputPath , "stats.json" ) ;
538
- fs . writeFile (
539
- statsPath ,
540
- JSON . stringify ( stats ) ,
541
- { encoding : "utf-8" } ,
542
- ( ) => { }
543
- ) ;
544
- }
545
-
546
477
async postDashboardData ( dashData ) {
547
478
if ( ! this . _options . dashboardURL ) {
548
479
return Promise . resolve ( ) ;
0 commit comments