Ensure that presets properly flatten their options.
This commit is contained in:
parent
3a399d1eb9
commit
25d2f59018
@ -55,7 +55,21 @@ export type ConfigContext = {
|
||||
/**
|
||||
* Build a config chain for a given preset.
|
||||
*/
|
||||
export const buildPresetChain: (
|
||||
export function buildPresetChain(
|
||||
arg: PresetInstance,
|
||||
context: *,
|
||||
): ConfigChain | null {
|
||||
const chain = buildPresetChainWalker(arg, context);
|
||||
if (!chain) return null;
|
||||
|
||||
return {
|
||||
plugins: dedupDescriptors(chain.plugins),
|
||||
presets: dedupDescriptors(chain.presets),
|
||||
options: chain.options,
|
||||
};
|
||||
}
|
||||
|
||||
export const buildPresetChainWalker: (
|
||||
arg: PresetInstance,
|
||||
context: *,
|
||||
) => * = makeChainWalker({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user