Skip to content

Allow API, SSR and DSG functions to be disabled individually #374

Closed
@ascorbic

Description

@ascorbic

Currently the generated functions are all or nothing, so if a site uses Gatsby Functions it needs to generate the DSG and SSR functions too, even if they're not used (and vice versa). This is a problem when the DSG or SSR bundles are too large, as it means the whole build fails.

We should do two parts to this:

  • Allow these to be disabled individually via env var, but also allow NETLIFY_SKIP_GATSBY_FUNCTIONS to disable them all
  • Handle this automatically with gatsby-plugin-netlify, changing .nf-skip-gatsby-functions to contain more granular information

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions