Skip to content

Commit 9ddfdf5

Browse files
ascorbicKyleBlankRollinskodiakhq[bot]
authored
chore: remove beta info (#937)
* chore: remove beta warning * chore: update readme for GA * Apply suggestions from code review Co-authored-by: Kyle Rollins <kyleblankrollins@gmail.com> * chore: add ISR link Co-authored-by: Kyle Rollins <kyleblankrollins@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent f313dbb commit 9ddfdf5

File tree

3 files changed

+42
-37
lines changed

3 files changed

+42
-37
lines changed

README.md

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
![Next.js on Netlify Build Plugin](next-on-netlify.png)
1+
![Essential Next.js Build Plugin](next-on-netlify.png)
22

3-
# Essential Next.js Build Plugin (beta)
4-
5-
:warning: This is the beta version of the Essential Next.js plugin. For the stable version, refer to
6-
[Essential Next.js plugin v3](https://github.com/netlify/netlify-plugin-nextjs/tree/v3#readme) :warning:
3+
# Essential Next.js Build Plugin
74

85
<p align="center">
96
<a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/plugin-nextjs">
@@ -19,36 +16,46 @@
1916
Version 4 is a complete rewrite of the Essential Next.js plugin. For full details of everything that's new, check out
2017
[the v4 release notes](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/release-notes/v4.md)
2118

22-
## Installing the beta
19+
## Installing the plugin
2320

24-
- Install the module:
21+
The plugin installs automatically for new Next.js sites on Netlify. You can also install it manually like this:
2522

2623
```shell
27-
npm install -D @netlify/plugin-nextjs@beta
24+
npm install -D @netlify/plugin-nextjs
2825
```
2926

30-
- Change the `publish` directory to `.next` and add the plugin to `netlify.toml` if not already installed:
27+
...then add the plugin to your `netlify.toml` file:
3128

3229
```toml
33-
[build]
34-
publish = ".next"
35-
3630
[[plugins]]
3731
package = "@netlify/plugin-nextjs"
3832
```
3933

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.
34+
## Migrating from an older version of the plugin
35+
36+
You can manually upgrade from the previous version of the plugin by running the following command:
37+
38+
```shell
39+
npm install -D @netlify/plugin-nextjs@latest
40+
```
41+
42+
Change the `publish` directory to `.next`:
43+
44+
```toml
45+
[build]
46+
publish = ".next"
47+
```
48+
49+
If you previously set these values, they're no longer needed and can be removed:
50+
51+
- `distDir` in your `next.config.js`
52+
- `node_bundler = "esbuild"` in `netlify.toml`
53+
- `external_node_modules` in `netlify.toml`
4254

4355
The `serverless` and `experimental-serverless-trace` targets are deprecated in Next 12, and all builds with this plugin
4456
will now use the default `server` target. If you previously set the target in your `next.config.js`, you should remove
4557
it.
4658

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.
49-
50-
If you are using Nx, then you will need to point `publish` to the folder inside `dist`, e.g. `dist/apps/myapp/.next`.
51-
5259
If you currently use redirects or rewrites on your site, see
5360
[the Rewrites and Redirects guide](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/redirects-rewrites.md)
5461
for information on changes to how they are handled in this version.
@@ -57,7 +64,20 @@ If you want to use Next 12's beta Middleware feature, this will mostly work as e
5764
[read the docs on some caveats and workarounds](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/middleware.md)
5865
that are currently needed.
5966

60-
## Beta feedback
67+
## Monorepos
68+
69+
If you are using a monorepo you will need to change `publish` to point to the full path to the built `.next` directory,
70+
which may be in a subdirectory. If you have changed your `distDir` then it will need to match that.
71+
72+
If you are using Nx, then you will need to point `publish` to the folder inside `dist`, e.g. `dist/apps/myapp/.next`.
73+
74+
## Incremental Static Regeneration (ISR)
75+
76+
The Essential Next.js plugin now fully supports ISR on Netlify. For more details see
77+
[the ISR docs](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/isr.md).
78+
79+
## Feedback
6180

62-
Please share any thoughts, feedback or questions about the beta
63-
[in our discussion](https://github.com/netlify/netlify-plugin-nextjs/discussions/706).
81+
If you think you have found a bug in the plugin,
82+
[please open an issue](https://github.com/netlify/netlify-plugin-nextjs/issues). If you have comments or feature
83+
requests, [see the dicussion board](https://github.com/netlify/netlify-plugin-nextjs/discussions)

src/helpers/verification.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,3 @@ export const checkZipSize = async (file: string, maxSize: number = LAMBDA_MAX_SI
136136
greenBright`\n\nFor more information on fixing this, see ${blueBright`https://ntl.fyi/large-next-functions`}`,
137137
)
138138
}
139-
140-
export const logBetaMessage = () =>
141-
console.log(
142-
greenBright(
143-
outdent`
144-
Thank you for trying the Essential Next.js beta plugin.
145-
Please share feedback (both good and bad) at ${blueBright`https://ntl.fyi/next-beta-feedback`}
146-
`,
147-
),
148-
)

src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
verifyNetlifyBuildVersion,
1313
checkNextSiteHasBuilt,
1414
checkForRootPublish,
15-
logBetaMessage,
1615
checkZipSize,
1716
checkForOldFunctions,
1817
} from './helpers/verification'
@@ -26,7 +25,6 @@ const plugin: NetlifyPlugin = {
2625
cache,
2726
},
2827
}) {
29-
logBetaMessage()
3028
const { publish } = netlifyConfig.build
3129
checkForRootPublish({ publish, failBuild })
3230
verifyNetlifyBuildVersion({ failBuild, ...constants })
@@ -98,8 +96,5 @@ const plugin: NetlifyPlugin = {
9896
const { basePath } = await getNextConfig({ publish: netlifyConfig.build.publish, failBuild })
9997
await unpatchNextFiles(basePath)
10098
},
101-
onEnd() {
102-
logBetaMessage()
103-
},
10499
}
105100
module.exports = plugin

0 commit comments

Comments
 (0)