mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 17:07:22 +00:00
chore(cli): Show config diff only with DEBUG
This commit is contained in:
parent
8ffb15200e
commit
ac9c0b044e
@ -24,25 +24,27 @@ export async function invoke (args) {
|
|||||||
|
|
||||||
const newNuxt = await loadNuxt({ rootDir, dev: true, ready: false })
|
const newNuxt = await loadNuxt({ rootDir, dev: true, ready: false })
|
||||||
|
|
||||||
let configChanges
|
if (process.env.DEBUG) {
|
||||||
if (currentNuxt) {
|
let configChanges
|
||||||
configChanges = diff(currentNuxt.options, newNuxt.options, [
|
if (currentNuxt) {
|
||||||
'generate.staticAssets.version',
|
configChanges = diff(currentNuxt.options, newNuxt.options, [
|
||||||
'env.NITRO_PRESET'
|
'generate.staticAssets.version',
|
||||||
])
|
'env.NITRO_PRESET'
|
||||||
server.setApp(createLoadingHandler('Restarting...', 1))
|
])
|
||||||
await currentNuxt.close()
|
server.setApp(createLoadingHandler('Restarting...', 1))
|
||||||
currentNuxt = newNuxt
|
await currentNuxt.close()
|
||||||
} else {
|
currentNuxt = newNuxt
|
||||||
currentNuxt = newNuxt
|
|
||||||
}
|
|
||||||
|
|
||||||
if (configChanges) {
|
|
||||||
if (configChanges.length) {
|
|
||||||
info('Nuxt config updated:')
|
|
||||||
printDiff(configChanges)
|
|
||||||
} else {
|
} else {
|
||||||
info('Restarted nuxt due to config changes')
|
currentNuxt = newNuxt
|
||||||
|
}
|
||||||
|
|
||||||
|
if (configChanges) {
|
||||||
|
if (configChanges.length) {
|
||||||
|
info('Nuxt config updated:')
|
||||||
|
printDiff(configChanges)
|
||||||
|
} else {
|
||||||
|
info('Restarted nuxt due to config changes')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user