nuxt generate payload undefined
问题 I have a Nuxt project, in nuxt.config.js file, I have a function like this: generate: { async routes() { function postRoutes() { return axios .post('https://my-server.com/api/posts') .then((r) => r.data.map((post) => { // I log post data here, it exist console.log(post) return { route: `post/${post.id}`, payload: 'post' } })) } const response = await axios .all([postRoutes()]) .then(function (results) { const merged = [].concat(...results) return merged }) return response } }, Then, in pages