File tree 1 file changed +3
-20
lines changed
1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -1936,33 +1936,16 @@ class WebpackCLI implements IWebpackCLI {
1936
1936
config . options = [ ] ;
1937
1937
1938
1938
loadedConfigs . forEach ( ( loadedConfig ) => {
1939
- // TODO we should run webpack multiple times when the `--config` options have multiple values with `--merge`, need to solve for the next major release
1940
- if ( ( config . options as LoadableWebpackConfiguration [ ] ) . length === 0 ) {
1941
- config . options = loadedConfig . options as WebpackConfiguration ;
1942
- } else {
1943
- if ( ! Array . isArray ( config . options ) ) {
1944
- config . options = [ config . options ] ;
1945
- }
1946
-
1947
- if ( Array . isArray ( loadedConfig . options ) ) {
1948
- for ( const item of loadedConfig . options ) {
1949
- config . options . push ( item ) ;
1950
- }
1951
- } else {
1952
- config . options . push ( loadedConfig . options as WebpackConfiguration ) ;
1953
- }
1954
- }
1955
-
1956
1939
if ( Array . isArray ( loadedConfig . options ) ) {
1957
- for ( const options of loadedConfig . options ) {
1940
+ for ( const item of loadedConfig . options ) {
1941
+ ( config . options as WebpackConfiguration [ ] ) . push ( item ) ;
1958
1942
config . path . set ( options , [ loadedConfig . path ] ) ;
1959
1943
}
1960
1944
} else {
1945
+ ( config . options as WebpackConfiguration [ ] ) . push ( loadedConfig . options ) ;
1961
1946
config . path . set ( loadedConfig . options , [ loadedConfig . path ] ) ;
1962
1947
}
1963
1948
} ) ;
1964
-
1965
- config . options = config . options . length === 1 ? config . options [ 0 ] : config . options ;
1966
1949
} else {
1967
1950
// TODO ".mts" is not supported by `interpret`, need to add it
1968
1951
// Prioritize popular extensions first to avoid unnecessary fs calls
You can’t perform that action at this time.
0 commit comments