Skip to content

Commit 885be4d

Browse files
committed
Merge remote-tracking branch 'origin/main' into tests-canary-update
2 parents 7da023f + 733a021 commit 885be4d

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.6.0"
2+
".": "5.7.0"
33
}

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## [5.7.0](https://github.com/netlify/next-runtime/compare/v5.6.0...v5.7.0) (2024-08-26)
4+
5+
6+
### Features
7+
8+
* support next/image with static exports ([#2563](https://github.com/netlify/next-runtime/issues/2563)) ([b000c43](https://github.com/netlify/next-runtime/commit/b000c430ce486279178f3aa5f275c66a508fb1c8))
9+
10+
11+
### Bug Fixes
12+
13+
* handle cases of chunked middleware ([#2574](https://github.com/netlify/next-runtime/issues/2574)) ([666fe5a](https://github.com/netlify/next-runtime/commit/666fe5a6f54c1134fe80054adcf6aac4aec1ec58))
14+
315
## [5.6.0](https://github.com/netlify/next-runtime/compare/v5.5.1...v5.6.0) (2024-07-29)
416

517

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netlify/plugin-nextjs",
3-
"version": "5.6.0",
3+
"version": "5.7.0",
44
"description": "Run Next.js seamlessly on Netlify",
55
"main": "./dist/index.js",
66
"type": "module",

src/build/functions/edge.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const copyHandlerDependencies = async (
125125
const entrypoint = await readFile(join(srcDir, file), 'utf8')
126126
parts.push(`;// Concatenated file: ${file} \n`, entrypoint)
127127
}
128-
const exports = `export default _ENTRIES["middleware_${name}"].default;`
128+
const exports = `const middlewareEntryKey = Object.keys(_ENTRIES).find(entryKey => entryKey.startsWith("middleware_${name}")); export default _ENTRIES[middlewareEntryKey].default;`
129129
await mkdir(dirname(join(destDir, `server/${name}.js`)), { recursive: true })
130130

131131
await writeFile(join(destDir, `server/${name}.js`), [...parts, exports].join('\n'))

tests/fixtures/middleware/next.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ const nextConfig = {
44
eslint: {
55
ignoreDuringBuilds: true,
66
},
7+
webpack: (config) => {
8+
// this is a trigger to generate multiple `.next/server/middleware-[hash].js` files instead of
9+
// single `.next/server/middleware.js` file
10+
config.optimization.splitChunks.maxSize = 100_000
11+
12+
return config
13+
},
714
}
815

916
module.exports = nextConfig

0 commit comments

Comments
 (0)