1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

set dev flag when rendering

This commit is contained in:
nkzawa 2016-10-07 10:56:48 +09:00
parent 83c19b256a
commit 9150521c55

View file

@ -51,10 +51,10 @@ export default class Server {
} }
async render (req, res, path) { async render (req, res, path) {
const { dir } = this const { dir, dev } = this
let html let html
try { try {
html = await render(path, req, res, { dir }) html = await render(path, req, res, { dir, dev })
} catch (err) { } catch (err) {
if ('MODULE_NOT_FOUND' === err.code) { if ('MODULE_NOT_FOUND' === err.code) {
return this.render404(req, res) return this.render404(req, res)