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
+25-11Lines changed: 25 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
# Essential Next.js Build Plugin (beta)
4
4
5
-
6
-
:warning: This is the beta version of the Essential Next.js plugin. For the stable version, see [Essential Next.js plugin v3](https://github.com/netlify/netlify-plugin-nextjs/tree/v3#readme):warning:
5
+
:warning: This is the beta version of the Essential Next.js plugin. For the stable version, refer to
Version 4 is a complete rewrite of the Essential Next.js plugin. For full details of everything that's new, see [the v4 release notes](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/release-notes/v4.md)
19
+
Version 4 is a complete rewrite of the Essential Next.js plugin. For full details of everything that's new, check out
- Change the `publish` directory to `.next` and add the plugin to `netlify.toml` if not already installed:
29
+
30
+
- Change the `publish` directory to `.next` and add the plugin to `netlify.toml` if not already installed:
31
+
29
32
```toml
30
33
[build]
31
34
publish = ".next"
@@ -34,16 +37,27 @@ publish = ".next"
34
37
package = "@netlify/plugin-nextjs"
35
38
```
36
39
37
-
If you previously set a custom `distDir` in your `next.config.js`, or set `node_bundler` or `external_node_modules` in your `netlify.toml` these are no longer needed and can be removed.
40
+
If you previously set a custom `distDir` in your `next.config.js`, or set `node_bundler` or `external_node_modules` in
41
+
your `netlify.toml` these are no longer needed and can be removed.
42
+
43
+
The `serverless` and `experimental-serverless-trace` targets are deprecated in Next 12, and all builds with this plugin
44
+
will now use the default `server` target. If you previously set the target in your `next.config.js`, you should remove
45
+
it.
38
46
39
-
The `serverless` and `experimental-serverless-trace` targets are deprecated in Next 12, and all builds with this plugin will now use the default `server` target. If you previously set the target in your `next.config.js`, you should remove it.
47
+
If you are using a monorepo you will need to change `publish` to point to the full path to the built `.next` directory,
48
+
which may be in a subdirectory. If you have changed your `distDir` then it will need to match that.
40
49
41
-
If you are using a monorepo you will need to change`publish` to point to the full path to the built `.next` directory, which may be in a subdirectory. If you have changed your `distDir` then it will need to match that.
50
+
If you are using Nx, then you will need to point`publish` to the folder inside `dist`, e.g. `dist/apps/myapp/.next`.
42
51
43
-
If you are using Nx, then you will need to point `publish` to the folder inside `dist`, e.g. `dist/apps/myapp/.next`.
52
+
If you currently use redirects or rewrites on your site, see
53
+
[the Rewrites and Redirects guide](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/redirects-rewrites.md)
54
+
for information on changes to how they are handled in this version.
44
55
45
-
If you currently use redirects or rewrites on your site, see [the Rewrites and Redirects guide](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/redirects-rewrites.md) for information on changes to how they are handled in this version.
56
+
If you want to use Next 12's beta Middleware feature, this will mostly work as expected but please
57
+
[read the docs on some caveats and workarounds](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/middleware.md)
58
+
that are currently needed.
46
59
47
60
## Beta feedback
48
61
49
-
Please share any thoughts, feedback or questions about the beta [in our discussion](https://github.com/netlify/netlify-plugin-nextjs/discussions/706).
62
+
Please share any thoughts, feedback or questions about the beta
0 commit comments