Skip to content

Commit 858ed15

Browse files
committed
Added additional manual installation method
1 parent f44ac30 commit 858ed15

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

README.md

Lines changed: 21 additions & 5 deletions
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,21 @@ 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:
116+
117+
```text
118+
https://app.netlify.com/teams/slug/plugins/@netlify/plugin-nextjs/install
119+
```
120+
121+
and choose the site to install the Next.js Runtime on. Make sure to replace `slug` with your team's slug. This method
122+
is recommended because you will benefit from auto-upgrades to important fixes and feature updates.
123+
124+
### From `npm`:
111125

112126
```shell
113127
npm install -D @netlify/plugin-nextjs
@@ -117,9 +131,11 @@ npm install -D @netlify/plugin-nextjs
117131

118132
```toml
119133
[[plugins]]
120-
package = "@netlify/plugin-nextjs"
134+
package = "@netlify/plugin-nextjs"
121135
```
122136

137+
This method is recommended if you wish to pin the Next.js Runtime to a specific version.
138+
123139
## Manually upgrading from an older version of the Next.js Runtime
124140

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

141157
## 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).
158+
If your site uses pnpm to manage dependencies, currently you must [enable public hoisting](https://pnpm.io/npmrc#public-hoist-pattern).
143159
The simplest way to do this is to create a `.npmrc` file in the root of your project with the content:
144160

145161
```ini

0 commit comments

Comments
 (0)