Skip to content

Static builds of geosearch sites have no map geometry unless PRELOAD_MAP=true #750

Description

@jamiefolsom

The geometry content collection only loads when PRELOAD_MAP is set (src/content.config.ts) — it's independent of STATIC_BUILD. A site that uses geosearch but doesn't preload the map (marronage staging, for example) builds a static bundle whose geometry snapshot is empty: /api/geometry/index.json is [], so the bundled site has no map data at all.

In server mode that's fine because geometry is fetched live per viewport. In a static build there is no live fetch, so PRELOAD_MAP=true is effectively a precondition that nothing checks or documents.

Suggestion: when STATIC_BUILD is true and the config has geosearch enabled, either register the geometry loader regardless of PRELOAD_MAP, or fail the build with a message saying to set it.

Found while running a static build of marronage staging locally (dhtools performant-software/dhtools#17).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions