@@ -91,21 +91,25 @@ export const generatePrimaryInterfaces = (
91
91
TargetNamespace = MainNamespace ;
92
92
} else if ( module . process . renderer ) {
93
93
TargetNamespace = RendererNamespace ;
94
+ } else if ( module . process . utility ) {
95
+ TargetNamespace = UtilityNamespace ;
94
96
}
95
97
if ( TargetNamespace ) {
96
98
debug ( classify ( module . name ) . toLowerCase ( ) , EMRI [ classify ( module . name ) . toLowerCase ( ) ] ) ;
97
99
if ( ! EMRI [ classify ( module . name ) . toLowerCase ( ) ] && moduleString ) {
98
100
TargetNamespace . push ( moduleString ) ;
99
101
CrossProcessExportsNamespace . push ( moduleString ) ;
100
- if ( module . process . utility ) UtilityNamespace . push ( moduleString ) ;
102
+ if ( TargetNamespace !== UtilityNamespace && module . process . utility ) {
103
+ UtilityNamespace . push ( moduleString ) ;
104
+ }
101
105
}
102
106
EMRI [ classify ( module . name ) . toLowerCase ( ) ] = true ;
103
107
const declarations = [ ...newConstDeclarations , ...newTypeAliases ] . map (
104
108
( s ) => ` ${ s . substr ( 0 , s . length - 1 ) } ` ,
105
109
) ;
106
110
TargetNamespace . push ( ...declarations ) ;
107
111
CrossProcessExportsNamespace . push ( ...declarations ) ;
108
- if ( module . process . utility ) {
112
+ if ( TargetNamespace !== UtilityNamespace && module . process . utility ) {
109
113
UtilityNamespace . push ( ...declarations ) ;
110
114
if ( newConstDeclarations . length > 0 ) {
111
115
utilityNamespaceHasValues = true ;
0 commit comments