@@ -488,10 +488,7 @@ export class CompatAppBuilder {
488
488
this . addAppBoot ( this . compatApp . appBoot . readAppBoot ( ) ) ;
489
489
let babelConfig = await this . babelConfig ( resolverConfig ) ;
490
490
this . addBabelConfig ( babelConfig ) ;
491
- writeFileSync (
492
- join ( this . root , 'macros-config.json' ) ,
493
- JSON . stringify ( this . compatApp . macrosConfig . babelPluginConfig ( ) [ 0 ] , null , 2 )
494
- ) ;
491
+ this . addMacrosConfig ( this . compatApp . macrosConfig . babelPluginConfig ( ) [ 0 ] ) ;
495
492
}
496
493
497
494
private combinePackageJSON ( meta : AppMeta ) : object {
@@ -568,7 +565,7 @@ export class CompatAppBuilder {
568
565
warn ( 'Your build is slower because some babel plugins are non-serializable' ) ;
569
566
}
570
567
writeFileSync (
571
- join ( this . root , '_babel_config_.js' ) ,
568
+ join ( locateEmbroiderWorkingDir ( this . compatApp . root ) , '_babel_config_.js' ) ,
572
569
`module.exports = ${ JSON . stringify ( pconfig . config , null , 2 ) } ` ,
573
570
'utf8'
574
571
) ;
@@ -595,6 +592,12 @@ export class CompatAppBuilder {
595
592
} ) ;
596
593
}
597
594
595
+ private addMacrosConfig ( macrosConfig : any ) {
596
+ outputJSONSync ( join ( locateEmbroiderWorkingDir ( this . compatApp . root ) , 'macros-config.json' ) , macrosConfig , {
597
+ spaces : 2 ,
598
+ } ) ;
599
+ }
600
+
598
601
private addAppBoot ( appBoot ?: string ) {
599
602
writeFileSync ( join ( locateEmbroiderWorkingDir ( this . compatApp . root ) , 'ember-app-boot.js' ) , appBoot ?? '' ) ;
600
603
}
0 commit comments