mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
refactor(vue-app): add group for ssr logs (#5770)
This commit is contained in:
parent
ffb1844646
commit
a764e1f90d
@ -38,10 +38,14 @@ const NUXT = window.<%= globals.context %> || {}
|
|||||||
Object.assign(Vue.config, <%= serialize(vue.config) %>)<%= isTest ? '// eslint-disable-line' : '' %>
|
Object.assign(Vue.config, <%= serialize(vue.config) %>)<%= isTest ? '// eslint-disable-line' : '' %>
|
||||||
|
|
||||||
<% if (isDev) { %>
|
<% if (isDev) { %>
|
||||||
const logger = consola.withScope('nuxt:ssr')
|
|
||||||
const logs = NUXT.logs || []
|
const logs = NUXT.logs || []
|
||||||
logs.forEach(logObj => logger[logObj.type](logObj))
|
if (logs.length > 0) {
|
||||||
delete NUXT.logs
|
console.group("%c🚀 Nuxt.js SSR Logs", 'font-size: 110%')
|
||||||
|
const logger = consola.withScope('nuxt:ssr')
|
||||||
|
logs.forEach(logObj => logger[logObj.type](logObj))
|
||||||
|
delete NUXT.logs
|
||||||
|
console.groupEnd()
|
||||||
|
}
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (debug) { %>
|
<% if (debug) { %>
|
||||||
// Setup global Vue error handler
|
// Setup global Vue error handler
|
||||||
|
Loading…
Reference in New Issue
Block a user