Skip to content

Conversation

@ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Sep 5, 2022

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:

  • 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.

@ascorbic ascorbic requested a review from a team September 5, 2022 16:24
@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for next-hp-edge-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/next-hp-edge-demo/deploys/63171185a092e800084838d9
😎 Deploy Preview https://deploy-preview-1594--next-hp-edge-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Sep 5, 2022
@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/6317118507c39500081e1c09
😎 Deploy Preview https://deploy-preview-1594--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/631711841519070008a6bf4b
😎 Deploy Preview https://deploy-preview-1594--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/63171185a092e800084838d3
😎 Deploy Preview https://deploy-preview-1594--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/631711851519070008a6bf50
😎 Deploy Preview https://deploy-preview-1594--next-plugin-canary.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/631711859b67110008f21892
😎 Deploy Preview https://deploy-preview-1594--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines -5 to -13
<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>

Copy link
Contributor Author

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

Comment on lines -58 to -72
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`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edge is now default

Comment on lines 17 to 30

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).
Copy link
Contributor Author

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

Comment on lines 14 to 15
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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for context.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/631711849b67110008f21888
😎 Deploy Preview https://deploy-preview-1594--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/631711851f72f40009248f62
😎 Deploy Preview https://deploy-preview-1594--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/63171185387f35000824183d
😎 Deploy Preview https://deploy-preview-1594--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for next-plugin-rsc-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-rsc-demo/deploys/63171184387f350008241838
😎 Deploy Preview https://deploy-preview-1594--next-plugin-rsc-demo.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit 18ed1f0
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/631711841f72f40009248f5d
😎 Deploy Preview https://deploy-preview-1594--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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

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`

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?

Copy link
Contributor Author

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

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"

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
orinokai previously approved these changes Sep 6, 2022
Copy link
Contributor

@orinokai orinokai left a 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

## 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
Copy link
Contributor

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

@kodiakhq kodiakhq bot merged commit 98f15ce into main Sep 6, 2022
@kodiakhq kodiakhq bot deleted the mk/readme-updates branch September 6, 2022 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge type: chore work needed to keep the product and development running smoothly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants