Some checks failed
Build and deploy updated apps / Build & deploy (push) Failing after 1m7s
23 lines
530 B
TypeScript
23 lines
530 B
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
|
|
import {getConfig, getExpandedRoutes} from './utils/content-routes'
|
|
|
|
export default defineNuxtConfig({
|
|
$meta: {
|
|
name: 'content', // creates alias #layers/content
|
|
},
|
|
devtools: {enabled: true},
|
|
hooks: {
|
|
async 'prerender:routes'(context) {
|
|
context.routes.clear()
|
|
|
|
const config = await getConfig()
|
|
const routes = await getExpandedRoutes(config)
|
|
|
|
for (const route of routes) {
|
|
context.routes.add(`/${route}`)
|
|
}
|
|
},
|
|
}
|
|
})
|