next-runtime
next-runtime copied to clipboard
fix: support "app" dir
Summary
Add support for app dir (i.e. layouts RFC). This should have no effect unless a user has enabled experimental.appDir in the next.config.js. Adds a test suite that has been ported from the e2e tests in the Next.js monorepo. It uses vitest, because having both unit tests and e2e tests using jest was causing all kinds of trouble, and also Jest is annoying. I initially tried to use Cypress for the e2e tests, but the scripts that it injects break React 18 streaming. Instead I've adapted the Next.js test utils, which are based on Playwright. As with the Cypress tests, it runs on the deployed site.
We might want to consider using more of these vitest + playwright tests, because quite a few of the Next.js e2e tests could be adapted.
Test plan
The canary test site now uses an app dir, and is largely the same as the app-dir e2e test site from the Next.js monorepo. You can check that it builds and loads, but most of the individual checks are basically the ones in the e2e tests. It might be useful instead to test that there are no regressions in other sites, particularly those that use edge functions.
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
- https://vercel.com/blog/next-js-layouts-rfc-in-5-minutes

Standard checks:
- [ ] Check the Deploy Preview's Demo site for your PR's functionality
- [ ] Add docs when necessary
๐งช Once merged, make sure to update the version if needed and that it was published correctly.
Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/6396fbada4072600085ae1db |
| Deploy Preview | https://deploy-preview-1638--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/6396fbad61706400089d2859 |
| Deploy Preview | https://deploy-preview-1638--netlify-plugin-nextjs-static-root-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for netlify-plugin-nextjs-demo ready!
| Name | Link |
|---|---|
| Latest commit | 886917e9c4db316d2a323563d7aaaa03be151e91 |
| Latest deploy log | https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/634da5650d901a000ab4b9e3 |
| Deploy Preview | https://deploy-preview-1638--netlify-plugin-nextjs-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for next-hp-edge-demo ready!
| Name | Link |
|---|---|
| Latest commit | ee7747326a997c6216118c75b590b0ffcae49f6a |
| Latest deploy log | https://app.netlify.com/sites/next-hp-edge-demo/deploys/633e9620e7fe3100088541a8 |
| Deploy Preview | https://deploy-preview-1638--next-hp-edge-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for next-plugin-rsc-demo ready!
| Name | Link |
|---|---|
| Latest commit | 5b978bd4d0eda262903c0c2019d3678cba20b9c7 |
| Latest deploy log | https://app.netlify.com/sites/next-plugin-rsc-demo/deploys/63565a6d0c5b3100093423f4 |
| Deploy Preview | https://deploy-preview-1638--next-plugin-rsc-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for next-plugin-edge-middleware ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/6396fbad2248cf00080f1cd1 |
| Deploy Preview | https://deploy-preview-1638--next-plugin-edge-middleware.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for netlify-plugin-nextjs-export-demo ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/6396fbad52f12500086bff6e |
| Deploy Preview | https://deploy-preview-1638--netlify-plugin-nextjs-export-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for next-plugin-canary ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/next-plugin-canary/deploys/6396fbad0dffab0008a3cf9b |
| Deploy Preview | https://deploy-preview-1638--next-plugin-canary.netlify.app/ |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/6396fbad96898f00091f311f |
| Deploy Preview | https://deploy-preview-1638--netlify-plugin-nextjs-next-auth-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for next-plugin-app-dir failed.
| Name | Link |
|---|---|
| Latest commit | f5a29796efbcdbaacbf8d031dfc6c711f88a39b7 |
| Latest deploy log | https://app.netlify.com/sites/next-plugin-app-dir/deploys/63341e32e8752800087e1ebe |
Deploy Preview for next-i18next-demo ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/next-i18next-demo/deploys/6396fbad29a13b0008d8a83d |
| Deploy Preview | https://deploy-preview-1638--next-i18next-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for nextjs-plugin-custom-routes-demo ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/6396fbad32d7f20009aa2b33 |
| Deploy Preview | https://deploy-preview-1638--nextjs-plugin-custom-routes-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Just adding a link to the Next.js RFC
It looks like there are Canary E2E tests failing in your PR @ascorbic.
Deploy Preview for netlify-plugin-nextjs-demo ready!
| Name | Link |
|---|---|
| Latest commit | 7abc8b8e878461cc17a70f53d681423ba254476f |
| Latest deploy log | https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/6396fbad8b0c4100083d53a0 |
| Deploy Preview | https://deploy-preview-1638--netlify-plugin-nextjs-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.