mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
Use worker.name instead of edge function name to fix type error in @vercel/next (#11050)
Uses another `name` property instead of the now deprecated one.
This commit is contained in:
5
.changeset/rich-lemons-matter.md
Normal file
5
.changeset/rich-lemons-matter.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@vercel/next": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use `worker.name` instead of edge function name to fix type error in `@vercel/next`
|
||||||
@@ -2856,6 +2856,7 @@ export async function getMiddlewareBundle({
|
|||||||
return {
|
return {
|
||||||
type,
|
type,
|
||||||
page: edgeFunction.page,
|
page: edgeFunction.page,
|
||||||
|
name: edgeFunction.name,
|
||||||
edgeFunction: (() => {
|
edgeFunction: (() => {
|
||||||
const { source, map } = wrappedModuleSource.sourceAndMap();
|
const { source, map } = wrappedModuleSource.sourceAndMap();
|
||||||
const transformedMap = stringifySourceMap(
|
const transformedMap = stringifySourceMap(
|
||||||
@@ -2951,8 +2952,7 @@ export async function getMiddlewareBundle({
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (const worker of workerConfigs.values()) {
|
for (const worker of workerConfigs.values()) {
|
||||||
const edgeFile = worker.edgeFunction.name;
|
let shortPath = worker.name;
|
||||||
let shortPath = edgeFile;
|
|
||||||
|
|
||||||
// Replacing the folder prefix for the page
|
// Replacing the folder prefix for the page
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user