fix: collapsed ssr log (#6590)

This commit is contained in:
Pim 2019-10-18 11:36:49 +02:00 committed by Xin Du (Clark)
parent 2b6589cca8
commit b031fac121

View File

@ -40,7 +40,7 @@ Object.assign(Vue.config, <%= serialize(vue.config) %>)<%= isTest ? '// eslint-d
const logs = NUXT.logs || [] const logs = NUXT.logs || []
if (logs.length > 0) { if (logs.length > 0) {
const ssrLogSyle = 'background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;' const ssrLogSyle = 'background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;'
console.group && console.group <%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ("%cNuxt SSR", ssrLogSyle) console.group && console.group<%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ("%cNuxt SSR", ssrLogSyle)
logs.forEach(logObj => (console[logObj.type] || console.log)(...logObj.args)) logs.forEach(logObj => (console[logObj.type] || console.log)(...logObj.args))
delete NUXT.logs delete NUXT.logs
console.groupEnd && console.groupEnd() console.groupEnd && console.groupEnd()