Skip to content

Commit df2aee1

Browse files
authored
chore(docs): document additional way to manually install Next.js Runtime (#1813)
1 parent 6a0b040 commit df2aee1

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ by targeting the `/_next/image/*` route:
4444

4545
## Disabling included image loader
4646

47-
If you wish to disable the use of the image loader which is bundled into the runtime by default, set the `DISABLE_IPX` environment variable to `true`.
47+
If you wish to disable the use of the image loader which is bundled into the runtime by default, set the `DISABLE_IPX` environment variable to `true`.
4848

4949
This should only be done if the site is not using `next/image` or is using a different loader (such as Cloudinary or Imgix).
5050

@@ -60,7 +60,7 @@ For more details on Next.js Middleware with Netlify, see the [middleware docs](h
6060

6161
### Limitations
6262

63-
Due to how the site configuration is handled when it's run using Netlify Edge Functions, data such as `locale` and `defaultLocale` will be missing on the `req.nextUrl` object when running `netlify dev`.
63+
Due to how the site configuration is handled when it's run using Netlify Edge Functions, data such as `locale` and `defaultLocale` will be missing on the `req.nextUrl` object when running `netlify dev`.
6464

6565
However, this data is available on `req.nextUrl` in a production environment.
6666

@@ -107,7 +107,15 @@ Edge runtime or middleware is enabled it will also generate edge functions for m
107107

108108
## Manually installing the Next.js Runtime
109109

110-
The Next.js Runtime installs automatically for new Next.js sites on Netlify. You can also install it manually like this:
110+
The Next.js Runtime installs automatically for new Next.js sites on Netlify. You can also install it manually in the
111+
following ways:
112+
113+
### From the UI (Recommended):
114+
115+
You can go to the [UI](https://app.netlify.com/plugins/@netlify/plugin-nextjs/install) and choose the site to install the Next.js Runtime on. This method
116+
is recommended because you will benefit from auto-upgrades to important fixes and feature updates.
117+
118+
### From `npm`:
111119

112120
```shell
113121
npm install -D @netlify/plugin-nextjs
@@ -117,9 +125,11 @@ npm install -D @netlify/plugin-nextjs
117125

118126
```toml
119127
[[plugins]]
120-
package = "@netlify/plugin-nextjs"
128+
package = "@netlify/plugin-nextjs"
121129
```
122130

131+
This method is recommended if you wish to pin the Next.js Runtime to a specific version.
132+
123133
## Manually upgrading from an older version of the Next.js Runtime
124134

125135
If you previously set these values, they're no longer needed and should be removed:
@@ -139,7 +149,7 @@ information on changes to how they are handled in this version. In particular, n
139149
files must be placed in `public`, not in the root of the site.
140150

141151
## Using with pnpm
142-
If your site uses pnpm to manage dependencies, currently you must [enable public hoisting](https://pnpm.io/npmrc#public-hoist-pattern).
152+
If your site uses pnpm to manage dependencies, currently you must [enable public hoisting](https://pnpm.io/npmrc#public-hoist-pattern).
143153
The simplest way to do this is to create a `.npmrc` file in the root of your project with the content:
144154

145155
```ini

0 commit comments

Comments
 (0)