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

Call ensurePage only in the dev mode.

This commit is contained in:
Arunoda Susiripala 2017-04-03 23:44:42 +05:30
parent a0945c7800
commit 8938843025

View file

@ -131,7 +131,9 @@ export default class Server {
const paths = params.path || ['']
const pathname = `/${paths.join('/')}`
await this.hotReloader.ensurePage(pathname)
if (this.dev) {
await this.hotReloader.ensurePage(pathname)
}
if (!this.handleBuildId(params.buildId, res)) {
res.setHeader('Content-Type', 'text/javascript')