PhoenixAssets.Graph.Builder (PhoenixAssets v0.1.0)

View Source

Assembles the Phoenix Asset Graph map from plugins and the Vite manifest.

Collects every plugin's graph_entries/2, groups them by kind (pages, routes, stories, electric shapes, pubsub topics, locales), merges every plugin's vite_config/2 patch into the "vite" section, and merges the Vite manifest's entry chunks. The result is a plain map ready to be encoded as graph.json (key ordering is applied by the canonical encoder at write time).

Summary

Functions

Builds the asset-graph map.

Functions

build(ctx, opts \\ [])

@spec build(
  PhoenixAssets.Context.t(),
  keyword()
) :: map()

Builds the asset-graph map.

Options:

  • :manifest -- a pre-loaded Vite manifest map (otherwise loaded from the configured :vite_manifest path; absent in development).