Skip to content

Allow userOptions to nullify certain keys in a plugin's defaults #812

@folliehiyuki

Description

@folliehiyuki

Enter your suggestions in details:

A Lume plugin can allow users to supply additional options for the underlying program it utilizes. The way official plugins handle deep merging is by using the internal merge() function, which discards keys with undefined values. This is fine for most cases, except when the underlying program has a mandatory but mutually-exclusive set of options (e.g. esbuild). If the default settings contain 1 of these, the other keys cannot be specified in the user options.

This is not a Lume issue. Generally the plugin's author should take care of it. Despite that, I'd love to have a standard way for them to handle the situation gracefully, since most of the time the plugin can't aggressively modify the underlying program's option set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions