Volt.HMR.ModuleGraph (Volt v0.13.1)

Copy Markdown View Source

ETS-backed dev-server module graph.

The graph is keyed by served URL, resolved module id, and source file. It is the primary source for HMR boundary lookup: served modules record their resolved imports, importers, query variants, and whether the module accepts itself with import.meta.hot.accept().

Summary

Functions

Create the module graph ETS table.

Mark every graph node for a file as invalidated and return affected nodes.

Remove all nodes for a file and unlink them from importers/imports.

Upsert a module and update importer links for its resolved imports.

Functions

clear()

create_table()

Create the module graph ETS table.

get_by_file(file)

get_by_id(id)

get_by_url(url)

invalidate_file(file, timestamp \\ System.system_time(:millisecond))

Mark every graph node for a file as invalidated and return affected nodes.

remove_file(file)

Remove all nodes for a file and unlink them from importers/imports.

update_module(url, id, file, imports, opts \\ [])

Upsert a module and update importer links for its resolved imports.