Skip to content

Commit

Permalink
merge arrays in config (#2006)
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Dec 18, 2020
1 parent 4b182b4 commit 6d35838
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions snowpack/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ export function createConfiguration(
return [validationErrors, undefined];
}
const mergedConfig = merge<SnowpackUserConfig>([DEFAULT_CONFIG, config], {
isMergeableObject: isPlainObject,
isMergeableObject: (val) => isPlainObject(val) || Array.isArray(val),
});
return [null, normalizeConfig(mergedConfig)];
}
Expand Down Expand Up @@ -1006,7 +1006,7 @@ export function loadConfigurationForCLI(flags: CLIFlags, pkgManifest: any): Snow
cliConfig as any,
],
{
isMergeableObject: isPlainObject,
isMergeableObject: (val) => isPlainObject(val) || Array.isArray(val),
},
);

Expand Down
5 changes: 4 additions & 1 deletion test/build/config-extends-plugins/snowpack.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
},
"buildOptions": {
"minify": false
}
},
"plugins": [
"@snowpack/plugin-sass"
]
}

0 comments on commit 6d35838

Please sign in to comment.