Skip to content

Commit 8dcf91a

Browse files
committed
fix: fixed issue if there is no routes manifest
1 parent 9761de1 commit 8dcf91a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugin/src/helpers/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export const getNextConfig = async function getNextConfig({
4646
return failBuild('Error loading your Next config')
4747
}
4848

49-
const routesManifest = (await readJSON(files.find((f) => f.endsWith(ROUTES_MANIFEST_FILE)))) as RoutesManifest
49+
const routeManifestFile = files.find((f) => f.endsWith(ROUTES_MANIFEST_FILE))
50+
const routesManifest = (routeManifestFile ? await readJSON(routeManifestFile) : {}) as RoutesManifest
5051

5152
// If you need access to other manifest files, you can add them here as well
5253
return { ...config, appDir, ignore, routesManifest }

0 commit comments

Comments
 (0)