Skip to content

Extract the FSE snapshot builder into a shared module #133

Description

@kuuak

Parent

#132

What to build

Move the FSE snapshot builder out of the build script and into a shared module, so it can later be called from the running app as well as from the command line.

The snapshot builder is the logic that queries WordPress for all FSE templates and template parts, formats their blocks without resolving dynamic data, inlines each template part into its parent template, and attaches Polylang translation variants alongside the default-language part.

This ticket is a prefactor with no behavioural change. The snapshot is still built at build time, still written to the same file, still statically imported by the template lookup. Only its location changes. It exists so the behavioural change that follows is a small, reviewable diff rather than code motion tangled with a caching change.

Acceptance criteria

  • The snapshot builder is an exported async function in the app's own module tree, callable from both the build script and the app
  • The build script produces byte-identical output to before the extraction, verified against a real WordPress instance
  • The dev and build lifecycle hooks behave exactly as before
  • No caching, no configuration flags, and no changes to any consumer of the snapshot

Blocked by

None — can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentTicket is scoped and ready for an agent session to pick up

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions