Skip to content

Commit

Permalink
Fix renderPage in production mode (#3089)
Browse files Browse the repository at this point in the history
The next object was not being exported in the same manner in dev vs. prod mode.
  • Loading branch information
kpdecker authored and timneutkens committed Oct 14, 2017
1 parent 11fe73e commit 8711a7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions client/next-dev.js
Original file line number Diff line number Diff line change
@@ -1,10 1,11 @@
import 'react-hot-loader/patch'
import initNext, * as next from './'
import initOnDemandEntries from './on-demand-entries-client'
import initWebpackHMR from './webpack-hot-middleware-client'

const next = window.next = require('./')
window.next = next

next.default()
initNext()
.then((emitter) => {
initOnDemandEntries()
initWebpackHMR()
Expand Down
6 changes: 4 additions & 2 deletions client/next.js
Original file line number Diff line number Diff line change
@@ -1,6 1,8 @@
import next from './'
import initNext, * as next from './'

next()
window.next = next

initNext()
.catch((err) => {
console.error(`${err.message}\n${err.stack}`)
})

0 comments on commit 8711a7d

Please sign in to comment.