mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): log errors thrown when booting the nuxt app (#19187)
This commit is contained in:
parent
b1fd5200f5
commit
7479d469dd
@ -194,6 +194,10 @@ export function createNuxtApp (options: CreateOptions) {
|
||||
})
|
||||
}
|
||||
|
||||
// Log errors captured when running plugins, in the `app:created` and `app:beforeMount` hooks
|
||||
// as well as when mounting the app and in the `app:mounted` hook
|
||||
nuxtApp.hook('app:error', (...args) => { console.error('[nuxt] error caught during app initialization', ...args) })
|
||||
|
||||
// Expose runtime config
|
||||
const runtimeConfig = process.server
|
||||
? options.ssrContext!.runtimeConfig
|
||||
|
Loading…
Reference in New Issue
Block a user