-
Notifications
You must be signed in to change notification settings - Fork 95
chore: update READMEs #1594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update READMEs #1594
Conversation
✅ Deploy Preview for next-hp-edge-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-export-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-edge-middleware ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-canary ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
| <p align="center"> | ||
| <a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/plugin-nextjs"> | ||
| <img alt="" src="https://img.shields.io/npm/v/@netlify/plugin-nextjs"> | ||
| </a> | ||
| <a aria-label="MIT License" href="https://img.shields.io/npm/l/@netlify/plugin-nextjs"> | ||
| <img alt="" src="https://img.shields.io/npm/l/@netlify/plugin-nextjs"> | ||
| </a> | ||
| </p> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to the plugin package
| Next.js Middleware works out of the box on Netlify, but check out the | ||
| [docs on some caveats](https://github.com/netlify/next-runtime/blob/main/docs/middleware.md). By default, middleware | ||
| runs using SSR. For better results, you should enable [Netlify Edge Functions](#netlify-edge-functions), which ensures | ||
| middleware runs at the edge. To use Netlify Edge Functions for middleware or to enable | ||
| [edge server rendering](https://nextjs.org/blog/next-12-2#edge-server-rendering-experimental), set the environment | ||
| variable `NEXT_USE_NETLIFY_EDGE` to `true`. | ||
|
|
||
| ### No nested middleware in Next 12.2.0 | ||
|
|
||
| In Next 12.2.0, nested middleware [has been deprecated](https://nextjs.org/docs/messages/middleware-upgrade-guide) in | ||
| favor of root level middleware. If you are not using edge functions then this means that you won't get the benefits of | ||
| using a CDN, and ISR will not work. | ||
|
|
||
| To fix this issue, you can run your middleware on [Netlify Edge Functions](#netlify-edge-functions) by setting the | ||
| environment variable `NEXT_USE_NETLIFY_EDGE` to `true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edge is now default
|
|
||
| Regular Next.js Middleware doesn’t provide access to the actual response, or allow you to modify the request. The | ||
| `@netlify/next` library brings the power of Netlify Edge Functions to Next.js Middleware. It gives full access request | ||
| and response objects, allowing you to modify requests before they are sent to your Next.js app, and modify responses | ||
| before they are sent to the browser. This allows you to personalize pages on the fly, even if they are | ||
| statically-generated. It includes baked-in support for: | ||
|
|
||
| - HTML rewrites | ||
| - Page data transforms | ||
| - Modifying request headers | ||
| - Access to response body | ||
|
|
||
| For full details, | ||
| [see the docs](https://docs.netlify.com/integrations/frameworks/next-js/middleware/#next-js-advanced-middleware-with-the-netlify-next-library). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal for this is mostly just to give context and direct people to the docs
packages/runtime/README.md
Outdated
| This package handles the build process for Next.js sites on Netlify. You should not normally need to install it | ||
| yourself, as it is used automatically during builds of Next.js sites. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for context.
✅ Deploy Preview for netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for nextjs-plugin-custom-routes-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-i18next-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-rsc-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
fe572fb to
1b3c091
Compare
README.md
Outdated
| To fix this issue, you can run your middleware on [Netlify Edge Functions](#netlify-edge-functions) by setting the | ||
| environment variable `NEXT_USE_NETLIFY_EDGE` to `true`. | ||
| Next.js Middleware works out of the box on Netlify. By default, middleware runs using Netlify Edge Functions. For legacy | ||
| support for runnign Middleware at the origin, set the environment variable `NEXT_DISABLE_NETLIFY_EDGE` to `true`. Be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo runnign
| If you previously set these values, they're no longer needed and should be removed: | ||
|
|
||
| - `distDir` in your `next.config.js` | ||
| - `node_bundler = "esbuild"` in `netlify.toml` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about NEXT_USE_NETLIFY_EDGE in the toml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good addition
|
|
||
| ## Next.js Advanced Middleware | ||
|
|
||
| Regular Next.js Middleware doesn’t provide access to the actual response, or allow you to modify the request. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to "It gives full access to the request and response objects"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this tagged the wrong line, but it's about adding "to the" in that sentence
orinokai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a little typo
packages/next/README.md
Outdated
| ## Next.js Advanced Middleware | ||
|
|
||
| Regular Next.js Middleware doesn’t provide access to the actual response, or allow you to modify the request. The | ||
| `@netlify/next` library brings the power of Netlify Edge Functions to Next.js Middleware. It gives full access request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pebble] It gives full access to request and response objects
Summary
Creates READMEs for the individual packages, and remove some deprecated parts from the top-level README
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Standard checks:
🧪 Once merged, make sure to update the version if needed and that it was published correctly.