This commit is contained in:
Sébastien Chopin 2017-06-18 13:36:03 +02:00
parent 18fd47ee61
commit fb9b2b5e63

View File

@ -8,7 +8,7 @@ const debug = require('debug')('nuxt:build')
debug.color = 2 // force green color debug.color = 2 // force green color
const fs = require('fs') const fs = require('fs')
const parseArgs = require('minimist') const parseArgs = require('minimist')
const { Nuxt,Server } = require('../') const { Nuxt, Server } = require('../')
const chokidar = require('chokidar') const chokidar = require('chokidar')
const resolve = require('path').resolve const resolve = require('path').resolve
const without = require('lodash').without const without = require('lodash').without
@ -76,7 +76,7 @@ function listenOnConfigChanges (nuxt, server) {
const build = _.debounce(() => { const build = _.debounce(() => {
debug('[nuxt.config.js] changed') debug('[nuxt.config.js] changed')
delete require.cache[nuxtConfigFile] delete require.cache[nuxtConfigFile]
const options = {} let options = {}
if (fs.existsSync(nuxtConfigFile)) { if (fs.existsSync(nuxtConfigFile)) {
try { try {
options = require(nuxtConfigFile) options = require(nuxtConfigFile)