@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.
@@ -94,13 +94,17 @@ const writeEdgeFunctions = async (netlifyConfig) => {
94
94
  });
95
95
  manifest.functions.push(functionDefinition);
96
96
  }
97
- for (const edgeFunctionDefinition of Object.values(middlewareManifest.functions)) {
98
- const functionDefinition = await writeEdgeFunction({
99
- edgeFunctionDefinition,
100
- edgeFunctionRoot,
101
- netlifyConfig,
102
- });
103
- manifest.functions.push(functionDefinition);
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.9.2",
3
+ "version": "4.9.3",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "lib/index.js",
6
6
  "files": [