@@ -70,7 +70,7 @@ class ConfigGroup extends GroupHelper {
7070 }
7171 }
7272
73- async finalize ( moduleObj ) {
73+ finalize ( moduleObj ) {
7474 const newOptionsObject = {
7575 outputOptions : { } ,
7676 options : { } ,
@@ -84,7 +84,7 @@ class ConfigGroup extends GroupHelper {
8484 if ( configOptions . length > 0 ) {
8585 newOptionsObject [ 'options' ] = configOptions ;
8686 } else if ( typeof configOptions === 'function' ) {
87- const newOptions = await configOptions ( ) ;
87+ const newOptions = configOptions ( ) ;
8888 newOptionsObject [ 'options' ] = newOptions ;
8989 } else {
9090 if ( Array . isArray ( configOptions ) && ! configOptions . length ) {
@@ -112,7 +112,7 @@ class ConfigGroup extends GroupHelper {
112112 return newOptionsObject ;
113113 }
114114
115- async resolveConfigFiles ( ) {
115+ resolveConfigFiles ( ) {
116116 const { config, mode } = this . args ;
117117
118118 if ( config ) {
@@ -150,9 +150,9 @@ class ConfigGroup extends GroupHelper {
150150 }
151151 }
152152
153- async resolveConfigMerging ( ) {
153+ resolveConfigMerging ( ) {
154154 // eslint-disable-next-line no-prototype-builtins
155- if ( this . args . hasOwnProperty ( 'merge' ) ) {
155+ if ( Object . keys ( this . args ) . some ( arg => arg === 'merge' ) ) {
156156 const { merge } = this . args ;
157157
158158 const newConfigPath = this . resolveFilePath ( merge , 'webpack.base.js' ) ;
@@ -167,16 +167,16 @@ class ConfigGroup extends GroupHelper {
167167 }
168168 const foundConfig = configFiles [ 0 ] ;
169169 const resolvedConfig = this . requireConfig ( foundConfig ) ;
170- const newConfigurationsObject = await this . finalize ( resolvedConfig ) ;
170+ const newConfigurationsObject = this . finalize ( resolvedConfig ) ;
171171 const webpackMerge = require ( 'webpack-merge' ) ;
172172 this . opts [ 'options' ] = webpackMerge ( this . opts [ 'options' ] , newConfigurationsObject . options ) ;
173173 }
174174 }
175175 }
176176
177- async run ( ) {
178- await this . resolveConfigFiles ( ) ;
179- await this . resolveConfigMerging ( ) ;
177+ run ( ) {
178+ this . resolveConfigFiles ( ) ;
179+ this . resolveConfigMerging ( ) ;
180180 return this . opts ;
181181 }
182182}
0 commit comments