import 'react-hot-loader/patch'
import patch from './patch-react'

// apply patch first
patch((err) => {
  console.error(err)
  next.renderError(err)
})

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

import patch from './patch-react'

// apply patch first
patch((err) => {
  console.error(err)
  next.renderError(err)
})

require('react-hot-loader/patch')

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

fix HMR (#680)