Generate routes for apps

This commit is contained in:
Sam Carlton 2020-09-16 00:15:30 -05:00
parent 4ae327b2d6
commit 6dd754570c
2 changed files with 101 additions and 2 deletions

View file

@ -1,9 +1,25 @@
const pkg = require('./package')
import pkg from './package'
import buildAppList from './helpers/build-app-list'
module.exports = {
export default {
mode: 'universal',
target: 'static',
generate: {
routes() {
return buildAppList()
.then((appList) => {
// console.log('result', result)
return appList.map(app => ({
route: '/app/' + app.slug,
payload: appList
}))
})
}
},
/*
** Headers of the page
*/