@netlify/plugin-nextjs 4.9.2 → 4.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/helpers/edge.js +11 -7
- package/package.json +1 -1
package/lib/helpers/edge.js
CHANGED
|
@@ -94,13 +94,17 @@ const writeEdgeFunctions = async (netlifyConfig) => {
|
|
|
94
94
|
});
|
|
95
95
|
manifest.functions.push(functionDefinition);
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
// Older versions of the manifest format don't have the functions field
|
|
98
|
+
// No, the version field was not incremented
|
|
99
|
+
if (typeof middlewareManifest.functions === 'object') {
|
|
100
|
+
for (const edgeFunctionDefinition of Object.values(middlewareManifest.functions)) {
|
|
101
|
+
const functionDefinition = await writeEdgeFunction({
|
|
102
|
+
edgeFunctionDefinition,
|
|
103
|
+
edgeFunctionRoot,
|
|
104
|
+
netlifyConfig,
|
|
105
|
+
});
|
|
106
|
+
manifest.functions.push(functionDefinition);
|
|
107
|
+
}
|
|
104
108
|
}
|
|
105
109
|
await (0, fs_extra_1.writeJson)((0, path_1.join)(edgeFunctionRoot, 'manifest.json'), manifest);
|
|
106
110
|
};
|