diff --git a/app.coffee b/app.coffee index 0e06299..f6f4d67 100644 --- a/app.coffee +++ b/app.coffee @@ -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