MergeConfig

mergeConfig

mergeConfig

Performs a deep merge of two VendureConfig objects. Unlike Object.assign() the target object is not mutated, instead the function returns a new object which is the result of deeply merging the values of source into target.

Example

const result = mergeConfig(defaultConfig, {
  assetOptions: {
    uploadMaxFileSize: 5000,
  },
};

Signature

function mergeConfig<T extends VendureConfig>(target: T, source: PartialVendureConfig, depth:  = 0): T

Parameters

target

parameter
type:
T

source

parameter
type:
PartialVendureConfig

depth

parameter
type: