mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(nuxt): only log boot errors on client-side (#19553)
This commit is contained in:
parent
50f0ec6a21
commit
a313f06261
@ -197,11 +197,11 @@ export function createNuxtApp (options: CreateOptions) {
|
|||||||
window.addEventListener('nuxt.preloadError', (event) => {
|
window.addEventListener('nuxt.preloadError', (event) => {
|
||||||
nuxtApp.callHook('app:chunkError', { error: (event as Event & { payload: Error }).payload })
|
nuxtApp.callHook('app:chunkError', { error: (event as Event & { payload: Error }).payload })
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
// Log errors captured when running plugins, in the `app:created` and `app:beforeMount` hooks
|
// 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
|
// 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) })
|
nuxtApp.hook('app:error', (...args) => { console.error('[nuxt] error caught during app initialization', ...args) })
|
||||||
|
}
|
||||||
|
|
||||||
// Expose runtime config
|
// Expose runtime config
|
||||||
const runtimeConfig = process.server
|
const runtimeConfig = process.server
|
||||||
|
Loading…
Reference in New Issue
Block a user