@@ -75,7 +75,7 @@ export class PluginsService implements IPluginsService {
75
75
// Remove the plugin and call merge for another plugins that have configuration file
76
76
let pluginConfigurationFilePath = this . getPluginConfigurationFilePath ( pluginData , platformData ) ;
77
77
if ( this . $fs . exists ( pluginConfigurationFilePath ) . wait ( ) ) {
78
- this . merge ( pluginData , platformData ) . wait ( ) ;
78
+ this . merge ( pluginData , platformData , ( data : IPluginData ) => data . name !== pluginData . name ) . wait ( ) ;
79
79
}
80
80
81
81
if ( pluginData . pluginVariables ) {
@@ -340,12 +340,13 @@ export class PluginsService implements IPluginsService {
340
340
} ) . future < void > ( ) ( ) ;
341
341
}
342
342
343
- private merge ( pluginData : IPluginData , platformData : IPlatformData ) : IFuture < void > {
343
+ private merge ( pluginData : IPluginData , platformData : IPlatformData , mergeCondition ?: ( _pluginData : IPluginData ) => boolean ) : IFuture < void > {
344
344
return ( ( ) => {
345
345
let tnsModulesDestinationPath = path . join ( platformData . appDestinationDirectoryPath , constants . APP_FOLDER_NAME , constants . TNS_MODULES_FOLDER_NAME ) ;
346
346
let nodeModules = this . $broccoliBuilder . getChangedNodeModules ( tnsModulesDestinationPath , platformData . normalizedPlatformName . toLowerCase ( ) ) . wait ( ) ;
347
347
348
- _ ( _ . keys ( nodeModules ) )
348
+ _ ( nodeModules )
349
+ . keys ( )
349
350
. map ( nodeModule => this . getNodeModuleData ( path . join ( nodeModule , "package.json" ) ) . wait ( ) )
350
351
. map ( nodeModuleData => this . convertToPluginData ( nodeModuleData ) )
351
352
. filter ( data => data . isPlugin && this . $fs . exists ( this . getPluginConfigurationFilePath ( data , platformData ) ) . wait ( ) )
@@ -354,7 +355,9 @@ export class PluginsService implements IPluginsService {
354
355
this . initializeConfigurationFileFromCache ( platformData ) . wait ( ) ;
355
356
}
356
357
357
- this . mergeCore ( data , platformData ) . wait ( ) ;
358
+ if ( ! mergeCondition || ( mergeCondition && mergeCondition ( data ) ) ) {
359
+ this . mergeCore ( data , platformData ) . wait ( ) ;
360
+ }
358
361
} )
359
362
. value ( ) ;
360
363
0 commit comments