Skip to content

Commit 13e464e

Browse files
authored
chore: add v4 release notes (#745)
1 parent 68b5662 commit 13e464e

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
</a>
1515
</p>
1616

17+
## What's new in this version
18+
19+
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)
1720

1821
## Installing the beta
1922

docs/large-functions.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ There are two possible causes for this, each with its own solution. The list of
1010
[functions]
1111
included_files = ["!node_modules/a-large-module/**/*"]
1212
```
13-
If you really do need large modules (e.g. if you are running Puppeteer in a Next API route), consider changing to a Netlify function which will have less overhead than the equivalent Next.js function.
13+
14+
If you do need large modules at runtime (e.g. if you are running Puppeteer in a Next API route), consider changing to a Netlify function which will have less overhead than the equivalent Next.js function.
1415

1516
- **Large numbers of pre-rendered pages**
1617
If you have a very large number of pre-rendered pages, these can take up a lot of space in the function. There are two approaches to fixing this. One is to consider deferring the building of the pages. If you return `fallback: "blocking"` from `getStaticPaths` the rendering will be deferred until the first user requests the page. This is a good choice for low-traffic pages. It reduces build and deploy time, and can make your bundle a lot smaller.
17-
18+
1819
The other option is to enable an experimental feature that moves static files out of the function bundle. To do this, set the environment variable `EXPERIMENTAL_MOVE_STATIC_PAGES` to true.

docs/release-notes/v4.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Essential Next.js plugin v4 release notes
2+
3+
This is a full rewrite of the Essential Next.js plugin, with a new architecture that gives greater compatibility and stability.
4+
5+
## What's new
6+
7+
- Full support for Next.js rewrites, redirects and headers.
8+
- Removes requirement for the `target` to be set to `serverless`, which is deprecated in Next 12.
9+
- Faster builds and deploys. Instead of generating one function per route, there are just three functions per site and a much smaller list of rewrites.
10+
- Bundling now uses Next.js's own node-file-trace, giving more predictable results and smaller uploads.
11+
- Full support for Netlify's new [persistent On-Demand Builders](https://ntl.fyi/odb). Return `fallback: "blocking"` from `getStaticPaths` and your rendering will be deferred until the first page load, then persisted globally.
12+
- A new image server, built on Nuxt's [ipx](https://github.com/unjs/ipx/). This is a high-performance, framework-agnostic image server based on sharp. This implementation uses On-Demand Builders to persist transformed images globally. Improved source image caching reduces time-to-first-byte for new transforms.
13+
- Simplified configuration. You no longer need to set any Netlify-specific configuration options. For example, in a monorepo all you need to do is set `publish` to point to your `.next` directory and you can build the site in any way you like.
14+
15+
## Installing the beta
16+
17+
If you would like to try the beta, you should install it manually like this:
18+
19+
- Install the module:
20+
```shell
21+
npm install -D @netlify/plugin-nextjs@beta
22+
```
23+
- Change the `publish` directory to `.next` and add the plugin to `netlify.toml` if not already installed:
24+
```toml
25+
[build]
26+
publish = ".next"
27+
28+
[[plugins]]
29+
package = "@netlify/plugin-nextjs"
30+
```

0 commit comments

Comments
 (0)