Set it with `dist_dir` in bunext.config.ts or `--dist-dir` on any CLI
command (precedence: --dist-dir > BUNEXT_DIST_DIR > dist_dir > .bunext).
setupDistDir() resolves it in the CLI's preAction hook and at the start
of bunextInit(), so custom servers get the config value too.
- Read dist-derived paths from grabDirNames() inside functions instead of
at import time; a guard test enforces this.
- Derive the client asset URL prefix from the dist dir instead of
hard-coding /.bunext.
- Make the dev watcher ignore rules and probe follow the dist dir.
- Validate the dir: inside the project root, outside src/, public/ and
node_modules/, URL-safe characters only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>