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.
A static build should skip generating the
/apiroutes 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 leavesapi/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.