Hot reload pages and config

This commit is contained in:
Kyle Mathews 2015-06-11 20:24:03 -07:00
parent 2cf7d346cb
commit bdee83820e

View file

@ -1,2 +1,9 @@
exports.context = ->
return require.context './pages', true
exports.loadContext = (callback) ->
context = require.context './pages', true
if module.hot
module.hot.accept(context.id, ->
context = require.context './pages', true
callback context
)
callback context