next.js
53201b17 - [after] duplicate test pages for edge instead of next.patch (#69477)

Commit
1 year ago
[after] duplicate test pages for edge instead of next.patch (#69477) `unstable_after` needs to be tested in both nodejs and edge runtimes. Previously, we set the runtime via `next.patch()`, but this proved error-prone (e.g. because `sandbox()` call would override this patch, and not actually run anything in edge...) This PR makes this more static by splitting the test pages for `unstable_after` into `/nodejs` and `/edge`, each with a corresponding `export const runtime = "..."` in its root layout. The pages in `/edge` mirror the structure of `/nodejs` and reexport components from it (which makes the tests easier to update than simply duplicating everything). note that "use client" directives and route segment configs cannot be reexported and need to be duplicated.
Author
Parents
Loading