Writing a plugin
A plugin puts your own code inside an esdev build: it can invent a module, rewrite one that exists, or tell the watcher about a file the graph cannot discover. Project plugins are declared in esdev.json; programmatic builds pass them to build().
Plugins run in the build process and are esdev-only. The detailed guide is split by the decisions you make while writing one.
Plugin guide
Lifecycle and hooks — define a plugin object, filter work, and use the six hooks.
Dependencies and module context — return
dependsOnfiles and understand virtual modules.Context and ordering — use hook context, ordering, and build results.
Runtime and troubleshooting — understand where plugins run and diagnose mistakes.
See also the runtime:build API and the hot-reload plugin guide.