|
@@ -175,9 +175,16 @@ export function overrideConfigJSON(
|
175
|
175
|
|
176
|
176
|
if (!_.isEmpty(configJSON)) {
|
177
|
177
|
logger.info(
|
178
|
|
- `Extending ${configName} `
|
179
|
|
- + `with: ${JSON.stringify(configJSON)}`);
|
180
|
|
- _.merge(configObj, configJSON);
|
|
178
|
+ `Extending ${configName} with: ${
|
|
179
|
+ JSON.stringify(configJSON)}`);
|
|
180
|
+
|
|
181
|
+ // eslint-disable-next-line arrow-body-style
|
|
182
|
+ _.mergeWith(configObj, configJSON, (oldValue, newValue) => {
|
|
183
|
+
|
|
184
|
+ // XXX We don't want to merge the arrays, we want to
|
|
185
|
+ // overwrite them.
|
|
186
|
+ return Array.isArray(oldValue) ? newValue : undefined;
|
|
187
|
+ });
|
181
|
188
|
}
|
182
|
189
|
}
|
183
|
190
|
}
|