File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -127,15 +127,22 @@ module.exports = {
127
127
} ) ;
128
128
}
129
129
130
- // takes component object and creates file glob matching selected components
131
- config . globs . components = ( Array . isArray ( config . components ) && config . components . length >= 1 )
132
- ? '{' + config . components . join ( ',' ) + '}'
133
- : '{' + defaults . components . join ( ',' ) + '}'
130
+ const components = ( Array . isArray ( config . components ) && config . components . length >= 1 )
131
+ ? config . components
132
+ : defaults . components
133
+ ;
134
+ const individuals = ( Array . isArray ( config . individuals ) && config . individuals . length >= 1 )
135
+ ? config . individuals
136
+ : [ ]
134
137
;
138
+ const componentsExceptIndividuals = components . filter ( ( component ) => ! individuals . includes ( component ) ) ;
139
+
140
+ // takes component object and creates file glob matching selected components
141
+ config . globs . components = '{' + componentsExceptIndividuals . join ( ',' ) + '}' ;
135
142
136
143
// components that should be built, but excluded from main .css/.js files
137
- config . globs . individuals = ( Array . isArray ( config . individuals ) && config . individuals . length >= 1 )
138
- ? '{' + config . individuals . join ( ',' ) + '}'
144
+ config . globs . individuals = ( individuals . length >= 1 )
145
+ ? '{' + individuals . join ( ',' ) + '}'
139
146
: undefined
140
147
;
141
148
You can’t perform that action at this time.
0 commit comments