1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

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

This commit is contained in:
Cédric Marcone 2018-05-11 12:52:39 +00:00 committed by Tim Neutkens
parent 9de2c408c7
commit d3c710b325

View file

@ -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('/')) {