Skip to content

Skip generating the /api routes when the exported files already provide them #812

Description

@jamiefolsom

A static build should skip generating the /api routes when an export already provides them, so that the build does not spend minutes writing files that already exist.

In static mode, when the export is present, the /api/[model]/... routes return no static paths, the same way the preview routes do, and the export's files are copied into the output instead. Done when the build reads the exported record tree from disk and makes no requests to the FairData API. Those files may still sit in the build output so that the site can be previewed locally, but the publish upload leaves api/ out, because the export job has already written it to the site's storage.

Part of #710. Depends on the loaders reading the export, #811.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    static-mvpStatic build: in the MVP (one site published as plain files from develop)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions