Skip to content

Do not configure to set build.command, build.functions and build.publish #27

Closed
@ehmicky

Description

@ehmicky

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 using constants.FUNCTIONS_SRC (see Functions UI build settings #11)
  • Same for build.publish. This value can be retrieved using constants.PUBLISH_DIR.
  • The main reason we require setting build.command seem to be to ensure that next-on-netlify is run after next build. This should already be covered by this plugin considering it calls next-on-netlify programmatically during onPostBuild.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions