Ignore if in dev mode

This commit is contained in:
Sébastien Chopin 2016-12-20 19:26:01 +01:00
parent 095c8efe56
commit a7e2a87ee4

View File

@ -9,6 +9,7 @@ exports.render = function (req, res) {
console.error('> No build files found, please run `nuxt build` before launching `nuxt start`') // eslint-disable-line no-console
process.exit(1)
}
/* istanbul ignore if */
if (!this.renderer) {
setTimeout(() => {
this.render(req, res)
@ -39,6 +40,7 @@ exports.render = function (req, res) {
}
})
.then(() => {
/* istanbul ignore if */
if (this.dev && this._nuxtRegexp.test(req.url) && req.url.includes('.hot-update.json')) {
res.statusCode = 404
return res.end()