-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
What problem does this feature solve?
Currently only official plugins can respect the useConfigFiles
option when creating a project when defined in a preset (or manual mode). Right now 3rd party plugins have the option of making use of extendPackage
or using render
to write out the file manually. This would mostly be for 3rd party plugins to use extendPackage
and not worry about where the config ends up.
What does the proposed API look like?
Adding a method like addConfigTransform(key, transform)
to GeneratorAPI
that adds transforms to an object on the Generator
instance of the GeneratorAPI
. Then when extractConfigFiles
is eventually called the transforms can be resolved to Object.assign({}, configTransforms, this.configTransforms)
. It'd be simple enough to prevent adding transforms for something like the vue config (or maybe all of the defaults).
Would this be viable?