You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-8
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,11 @@ This means that you don't have to do anything — just build and deploy your si
35
35
36
36
You're able to [remove the plugin](https://docs.netlify.com/configure-builds/build-plugins/#remove-a-plugin) at any time by visiting the **Plugins** tab for your site in the Netlify UI.
37
37
38
-
### UI-based installation for existing Next.js sites
38
+
### For existing Next.js sites
39
39
40
-
If your Next.js project is already deployed to Netlify, use the Netlify UI to [install the Essential Next.js Build Plugin](http://app.netlify.com/plugins/@netlify/plugin-nextjs/install) in a few clicks.
40
+
### UI Installation
41
+
42
+
If your Next.js project was already deployed to Netlify pre-3.0.0, use the Netlify UI to [install the Essential Next.js Build Plugin](http://app.netlify.com/plugins/@netlify/plugin-nextjs/install) in a few clicks.
41
43
42
44
### Manual installation
43
45
@@ -52,6 +54,8 @@ If your Next.js project is already deployed to Netlify, use the Netlify UI to [i
52
54
package = "@netlify/plugin-nextjs"
53
55
```
54
56
57
+
Note: the plugin does not run for statically exported Next.js sites (aka sites that use `next export`). To use the plugin, you should use the `[build]` config in the .toml snippet above. Be sure to exclude `next export` from your build script.
58
+
55
59
You can also add context-specific properties and environment variables to your `netlify.toml`. Read more about [deploy contexts](https://docs.netlify.com/configure-builds/file-based-configuration/#deploy-contexts) in our docs. For example:
56
60
57
61
```toml
@@ -63,13 +67,13 @@ NODE_ENV = "production"
63
67
2\. From your project's base directory, use `npm`, `yarn`, or any other Node.js package manager to add this plugin to `devDependencies` in `package.json`.
64
68
65
69
```
66
-
npm install -D @netlify/plugin-nextjs
70
+
npm install --save @netlify/plugin-nextjs
67
71
```
68
72
69
73
or
70
74
71
75
```
72
-
yarn add -D @netlify/plugin-nextjs
76
+
yarn add @netlify/plugin-nextjs
73
77
```
74
78
75
79
Read more about [file-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation) in our docs.
@@ -148,13 +152,13 @@ For breaking Next.js releases, all Next.js versions before the breaking release
148
152
149
153
Next.js < 10.0.6 is locked to plugin version 1.1.3. To use the latest plugin version, upgrade to Next.js >= 10.0.6.
150
154
151
-
### Fallbacks for Pages with `getStaticPaths`
155
+
### Fallback Pages
152
156
153
-
[Fallback pages](https://nextjs.org/docs/basic-features/data-fetching#fallback-true) behave differently with this plugin than they do with Next.js. On Next.js, when navigating to a path that is not defined in `getStaticPaths`, it first displays the fallback page. Next.js then generates the HTML in the background and caches it for future requests.
157
+
As of v3.3.0, this plugin uses Netlify's [On-Demand Builders](https://docs.netlify.com/configure-builds/on-demand-builders/) for pages that use `fallback: true` or `fallback: blocking` in getStaticPaths. This means the page is built once and then cached until a future deploy. This is Netlify's first step towards solving the problem ISR originally set out to solve.
154
158
155
-
With this plugin, when navigating to a path that is not defined in `getStaticPaths`, it server-side renders the page and sends it directly to the user. The user never sees the fallback page. The page is not cached for future requests.
159
+
### Incremental Static Regeneration
156
160
157
-
For more on this, see: [Issue #7](https://github.com/netlify/next-on-netlify/issues/7#issuecomment-636883539)
161
+
Using the `revalidate` flag in getStaticProps is not fully supported on Netlify. Currently, this plugin will SSR these pages instead of serving any prerendered/incrementally built HTML. See [this issue](https://github.com/netlify/netlify-plugin-nextjs/issues/151) for more info.
0 commit comments