sincecutoff.com
← all changes

neon dev hot-adds and reconciles functions when neon.ts changes

Introduced 2026-06-09 · score 0.94

HOW TO USE IT

When adding, removing, or changing functions while `neon dev` runs in config mode, edit `neon.ts`; the CLI reconciles functions by slug, hot-adding and removing servers and restarting only functions whose configuration changed. This applies only when running from `neon.ts`, not in single-`--source` mode.

neon dev

WHY THIS HELPS

Add, remove, or change a function in a repository's neon.ts while its local dev servers are running.

BEFORE THIS CHANGE

Before this change, adding a function required fully restarting `neon dev`.

REQUIREMENTS AND LIMITATIONS

  • Version: v2.24.0
  • `--source <path>`: Selects single-function mode; omit it to serve functions declared in `neon.ts`. Config reconciliation does not apply in single-source mode.
  • `preview.functions` (required): Functions declared here are served in config mode; `neon.ts` with no functions to serve produces an error.
  • function `slug` (required): Functions are keyed by slug when reconciling changes.
  • function `source` (required): Function source path; a change restarts that function.
  • function `dev.port`: Explicit port; a change restarts that function. Without it, a free port is selected unless `dev.portless` is used.
  • function `dev.portless`: Enables portless mode; a change restarts that function. When enabled, the `portless` command must be on `PATH`.
  • function `env`: Function-specific environment values layer over the shared branch environment; a change restarts that function.
  • Prerequisite: Install the Neon CLI; the v2.24.0 README says npm installation requires Node.js 18.0 or higher.
  • Prerequisite: Config mode requires a `neon.ts` declaring at least one function under `preview.functions`.
  • Prerequisite: If any function uses `dev.portless: true`, install the `portless` command and make it available on `PATH`.
  • This behavior applies only in `neon.ts` config mode; single `--source` mode is unaffected.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card