fix: do not resolve packageFile content (#698)

This commit is contained in:
Rhys Arkins 2017-08-18 21:01:08 +02:00 committed by GitHub
parent 26cdabe57e
commit d72dccfbe1

View file

@ -20,7 +20,7 @@ async function resolveConfigPresets(
);
let config = {};
// First, merge all the preset configs from left to right
if (inputConfig.extends) {
if (inputConfig.extends && inputConfig.extends.length) {
logger.debug('Found presets');
for (const preset of inputConfig.extends) {
// istanbul ignore if
@ -44,7 +44,8 @@ async function resolveConfigPresets(
logger.trace({ config }, `Post-merge resolve config`);
for (const key of Object.keys(config)) {
const val = config[key];
if (isObject(val) && key !== 'logger') {
const ignoredKeys = ['api', 'content', 'logger'];
if (isObject(val) && ignoredKeys.indexOf(key) === -1) {
// Resolve nested objects
logger.trace(`Resolving object "${key}"`);
config[key] = await resolveConfigPresets(val, logger, existingPresets);