Skip to content

chore: add v4 release notes #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
</a>
</p>

## What's new in this version

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)

## Installing the beta

Expand Down
5 changes: 3 additions & 2 deletions docs/large-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ There are two possible causes for this, each with its own solution. The list of
[functions]
included_files = ["!node_modules/a-large-module/**/*"]
```
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.

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.

- **Large numbers of pre-rendered pages**
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.

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.
30 changes: 30 additions & 0 deletions docs/release-notes/v4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Essential Next.js plugin v4 release notes

This is a full rewrite of the Essential Next.js plugin, with a new architecture that gives greater compatibility and stability.

## What's new
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥


- Full support for Next.js rewrites, redirects and headers.
- Removes requirement for the `target` to be set to `serverless`, which is deprecated in Next 12.
- 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.
- Bundling now uses Next.js's own node-file-trace, giving more predictable results and smaller uploads.
- 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.
- 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.
- 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.

## Installing the beta

If you would like to try the beta, you should install it manually like this:

- Install the module:
```shell
npm install -D @netlify/plugin-nextjs@beta
```
- Change the `publish` directory to `.next` and add the plugin to `netlify.toml` if not already installed:
```toml
[build]
publish = ".next"

[[plugins]]
package = "@netlify/plugin-nextjs"
```