CLI

AFW projects use esdev with @opentf/esdev-plugin-afw. The plugin compiles JSX/TSX/MDX and discovers routes; esdev bundles JavaScript, processes CSS, runs tests and manages the development loop. The historical afw executable is retired.

CommandPurpose
esdev startBuild and watch the targets configured in esdev.json.
esdev build --minifyBuild release output.
esdev previewServe the existing static release output.
esdev test --config=esdev.test.json --domRun tests in the native DOM realm.
esdev test --config=esdev.test.json --browserRun tests in a real browser with its matching driver.
esdev typecheckRun the project's TypeScript checker.

Scaffolding

Shell
esdev create my-app

Choose a template, language and package manager at the prompts. See Installation for setup, non-interactive options and the current template migration limitation.

Project configuration

Configure plugins and build targets in esdev.json. A browser app needs an HTML entry whose module script imports @afw/routes and calls mountApp. SSG adds a prerender target with then: run; a fullstack app supplies a server entry. See Production Build and Server.

Development uses esdev's rebuild/reload behavior. The old /__hmr and /__route contracts belong to the retired CLI; refer to the official development loop for current behavior.

Last updated on
Edit this page