Releases: opennextjs/opennextjs-netlify
v4.2.2
v4.2.1
@netlify/plugin-nextjs v4.2.0
@netlify/plugin-nextjs v4.1.3
@netlify/plugin-nextjs v4.1.2
@netlify/plugin-nextjs v4.1.1
@netlify/plugin-nextjs v4.1.0
@netlify/plugin-nextjs v4.0.0
This is a full rewrite of the Essential Next.js plugin, with a new architecture that gives greater compatibility and stability.
What's new
- Full support for incremental static regeneration (ISR).
- Full support for Next.js rewrites, redirects and headers.
- Beta support for Next 12 Middleware
- 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.
- Full support for Netlify's new persistent On-Demand Builders. Return
fallback: "blocking"
fromgetStaticPaths
and your rendering will be deferred until the first page load, then persisted globally. - A new image server for next/image, built on Nuxt's 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. - Removes requirement for the
target
to be set toserverless
, which is deprecated in Next 12. - Bundling now uses Next.js's own node-file-trace, giving more predictable results and smaller uploads.
Breaking changes
The publish
directory should point to the site's .next
directory or distDir
if set, rather than out
as in previous versions of the plugin.
Migration guide
Change the publish
directory to .next
:
[build]
publish = ".next"
If you previously set these values, they're no longer needed and can be removed:
target: "serverless"
in yournext.config.js
distDir
in yournext.config.js
node_bundler = "esbuild"
innetlify.toml
external_node_modules
innetlify.toml
If you currently use redirects or rewrites on your site, see the Rewrites and Redirects guide for information on changes to how they are handled in this version.
If you want to use Next 12's beta Middleware feature, this will mostly work as expected but please read the docs on some caveats and workarounds that are currently needed.
@netlify/plugin-nextjs v4.0.0-rc.2
Bug Fixes
- handle Windows paths correctly (#948) (efa53fd)
- correctly handle requests with encoded characters (#954) (b2f8f5b)
Full Changelog: v4.0.0-rc.1...v4.0.0-rc.2