Closed
Description
In order to use this plugin, users have to set build.command
, build.functions
and build.publish
in their netlify.toml
.
We should instead re-use the configuration properties set the site:
- If
build.functions
is defined, we should use this. If not, we should default to the default functions directory. This value can be retrieved usingconstants.FUNCTIONS_SRC
(see Functions UI build settings #11) - Same for
build.publish
. This value can be retrieved usingconstants.PUBLISH_DIR
. - The main reason we require setting
build.command
seem to be to ensure thatnext-on-netlify
is run afternext build
. This should already be covered by this plugin considering it callsnext-on-netlify
programmatically duringonPostBuild
.
This would require updating next-on-netlify
so it accepts custom functions and publish directories.
The main pros would be:
- This allows users to define custom functions and publish directories
- This removes those configuration steps, so we can eventually provide a 0-steps use of this plugin