fix(nuxt): print errors when compiling templates (#26410)

This commit is contained in:
Anthony Fu 2024-03-21 10:38:54 +01:00 committed by GitHub
parent f344d39dab
commit 4a880cb693
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,6 +47,7 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp, options: { filter?:
const oldContents = nuxt.vfs[fullPath]
const contents = await compileTemplate(template, templateContext).catch((e) => {
logger.error(`Could not compile template \`${template.filename}\`.`)
logger.error(e)
throw e
})