Skip to content

Commit d3c710b

Browse files
cedric-marconetimneutkens
authored andcommitted
Fixes 'next export' when exportPathMap function depends on runtime config (vercel#4339)
1 parent 9de2c40 commit d3c710b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/export.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ export default async function (dir, options, configuration) {
8181
}
8282
}
8383

84-
const exportPathMap = await nextConfig.exportPathMap(defaultPathMap)
85-
const exportPaths = Object.keys(exportPathMap)
86-
8784
// Start the rendering process
8885
const renderOpts = {
8986
dir,
@@ -116,6 +113,9 @@ export default async function (dir, options, configuration) {
116113
nextExport: true
117114
}
118115

116+
const exportPathMap = await nextConfig.exportPathMap(defaultPathMap)
117+
const exportPaths = Object.keys(exportPathMap)
118+
119119
for (const path of exportPaths) {
120120
log(`> exporting path: ${path}`)
121121
if (!path.startsWith('/')) {

0 commit comments

Comments
 (0)