Commit d3c710b3 authored by Cédric Marcone's avatar Cédric Marcone Committed by Tim Neutkens

Fixes 'next export' when exportPathMap function depends on runtime config (#4339)

parent 9de2c408
......@@ -81,9 +81,6 @@ export default async function (dir, options, configuration) {
}
}
const exportPathMap = await nextConfig.exportPathMap(defaultPathMap)
const exportPaths = Object.keys(exportPathMap)
// Start the rendering process
const renderOpts = {
dir,
......@@ -116,6 +113,9 @@ export default async function (dir, options, configuration) {
nextExport: true
}
const exportPathMap = await nextConfig.exportPathMap(defaultPathMap)
const exportPaths = Object.keys(exportPathMap)
for (const path of exportPaths) {
log(`> exporting path: ${path}`)
if (!path.startsWith('/')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment