1 | "use strict";exports.__esModule=true;exports.loadStaticPaths=loadStaticPaths;var _utils=require("../build/utils");var _loadComponents=require("../next-server/server/load-components");require("../next-server/server/node-polyfill-fetch");let workerWasUsed=false;
|
2 |
|
3 |
|
4 | async function loadStaticPaths(distDir,pathname,serverless,config,locales,defaultLocale){
|
5 |
|
6 | if(workerWasUsed){process.exit(1);}
|
7 | require('./../next-server/lib/runtime-config').setConfig(config);const components=await(0,_loadComponents.loadComponents)(distDir,pathname,serverless);if(!components.getStaticPaths){
|
8 |
|
9 | throw new Error(`Invariant: failed to load page with getStaticPaths for ${pathname}`);}workerWasUsed=true;return(0,_utils.buildStaticPaths)(pathname,components.getStaticPaths,locales,defaultLocale);}
|
10 |
|
\ | No newline at end of file |