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

Fix renderPage in production mode (#3089)

The next object was not being exported in the same manner in dev vs. prod mode.
This commit is contained in:
Kevin Decker 2017-10-14 12:20:49 -05:00 committed by Tim Neutkens
parent 11fe73e9ba
commit 8711a7d14e
2 changed files with 7 additions and 4 deletions

View file

@ -1,10 +1,11 @@
import 'react-hot-loader/patch' import 'react-hot-loader/patch'
import initNext, * as next from './'
import initOnDemandEntries from './on-demand-entries-client' import initOnDemandEntries from './on-demand-entries-client'
import initWebpackHMR from './webpack-hot-middleware-client' import initWebpackHMR from './webpack-hot-middleware-client'
const next = window.next = require('./') window.next = next
next.default() initNext()
.then((emitter) => { .then((emitter) => {
initOnDemandEntries() initOnDemandEntries()
initWebpackHMR() initWebpackHMR()

View file

@ -1,6 +1,8 @@
import next from './' import initNext, * as next from './'
next() window.next = next
initNext()
.catch((err) => { .catch((err) => {
console.error(`${err.message}\n${err.stack}`) console.error(`${err.message}\n${err.stack}`)
}) })