File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,16 @@ var Project = function () {
165
165
var userConfigObj = configMethod . config . call ( userConfig , options , this . cwd ) ;
166
166
167
167
if ( userConfigObj ) {
168
+ if ( Array . isArray ( userConfigObj . export ) ) {
169
+ userConfigObj . export = userConfigObj . export . filter ( function ( item ) {
170
+ if ( ( typeof item === 'undefined' ? 'undefined' : _typeof ( item ) ) === 'object' ) {
171
+ _this . config . setGroupExports ( item . name , item . export ) ;
172
+ return false ;
173
+ } else {
174
+ return true ;
175
+ }
176
+ } ) ;
177
+ }
168
178
this . config . setExports ( userConfigObj . export ) ;
169
179
this . config . setCompiler ( userConfigObj . modifyWebpackConfig ) ;
170
180
this . config . setSync ( userConfigObj . sync ) ;
Original file line number Diff line number Diff line change @@ -137,6 +137,16 @@ class Project {
137
137
const userConfigObj = configMethod . config . call ( userConfig , options , this . cwd ) ;
138
138
139
139
if ( userConfigObj ) {
140
+ if ( Array . isArray ( userConfigObj . export ) ) {
141
+ userConfigObj . export = userConfigObj . export . filter ( ( item ) => {
142
+ if ( typeof item === 'object' ) {
143
+ this . config . setGroupExports ( item . name , item . export )
144
+ return false
145
+ } else {
146
+ return true
147
+ }
148
+ } )
149
+ }
140
150
this . config . setExports ( userConfigObj . export ) ;
141
151
this . config . setCompiler ( userConfigObj . modifyWebpackConfig ) ;
142
152
this . config . setSync ( userConfigObj . sync ) ;
You can’t perform that action at this time.
0 commit comments