- Notifications
You must be signed in to change notification settings - Fork 426
Closed
Labels
area: command: buildarea: command: devarea: pluginstype: featurecode contributing to the implementation of a feature and/or user facing functionalitycode contributing to the implementation of a feature and/or user facing functionality
Description
Is your feature request related to a problem? Please describe.
Build plugins are now able to mutate the config at build time. However these changes are not persisted when running ntl dev
.
Describe the solution you'd like
Add a new build plugin hook, e.g. onPreDev
, which is called when running ntl dev
and before spawning the site's develop command. This could be used to update the configuration, inject env vars etc.
Describe alternatives you've considered
- Currently we write out a
_redirects
file if we need redirects to be available during dev, rather than using config mutation. This is fragile, prevents the use of redirects from the TOML file, and means that plugins must require users to runbuild
bedore they can rundev
. - Persist config changes made during
build
. However this wouldn't allow us to use different redirects for develop, and could give unexpected results if the user didn't runbuild
beforehand. This also requiresbuild
to be run beforedev
Metadata
Metadata
Assignees
Labels
area: command: buildarea: command: devarea: pluginstype: featurecode contributing to the implementation of a feature and/or user facing functionalitycode contributing to the implementation of a feature and/or user facing functionality