next.js
f3a6f976 - Preserve configured output directories during static export (#99507)

Commit
42 days ago
Preserve configured output directories during static export (#99507) ## Summary Static export with a custom `distDir` currently overwrites that option with `.next` during the build. Keep the configured export destination intact and derive the intermediate build directory separately, so adapters receive the original option while their build-directory argument still points to the artifacts. This removes a post-load config mutation as part of making completed configuration immutable for adapters and other runtime consumers. Preserve support for both relative and absolute Turbopack project output paths. ## Verification - Existing adapter tests pass in both production bundlers; custom export-directory coverage passes with Turbopack. - Existing server trace suite passes with Turbopack: six tests and five snapshots. - Existing Rust API suite passes its 25 main cases and 15 snapshots in each bundler. Its RSS stabilization stress case fails locally on both this branch and unmodified canary. <!-- NEXT_JS_LLM --> --------- Co-authored-by: Jamiboy Mohammad <jamiboym@gmail.com>
Author
Parents
Loading