Skip to content

Commit

Permalink
Tweaks to nuxt config to support build hook to stop hanging build due…
Browse files Browse the repository at this point in the history
… to bug in `nuxt-content-assets`: davestewart/nuxt-content-assets#49
  • Loading branch information
KristofVDB1 committed Mar 9, 2024
1 parent 05fed96 commit b0626de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
17 changes: 13 additions & 4 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ export default defineNuxtConfig({
],
},
},
// needed for nuxt content assets that keeps hanging on build: https://github.com/davestewart/nuxt-content-assets/issues/49#issuecomment-1812810278
hooks: {
close: (nuxt) => {
if (!nuxt.options._prepare)
process.exit()
}
},
// Alias declaration for easier access to components directory
alias: {
"@components": fileURLToPath(new URL('./components', import.meta.url)),
Expand All @@ -72,10 +79,12 @@ export default defineNuxtConfig({
// https://content.nuxtjs.org/
'@nuxt/content',
],
content: {
documentDriven: true,
highlight: {
theme: 'light-plus'
// ADD DYNAMIC PRERENDER ROUTES HERE
nitro: {
// define preset for nitro and which backend to serve the project
preset: "node-server",
prerender: {
// routes: ['/doc/vocabularium/', 'doc/applicatieprofiel/'],
}
},
})
5 changes: 1 addition & 4 deletions pages/index/index.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<content-header
title="OSLO"
subtitle="Frontend template"
/>
<content-header title="OSLO" subtitle="Frontend template" />
<vl-region>
<vl-layout>
<vl-region>
Expand Down

0 comments on commit b0626de

Please sign in to comment.