gatsby-starter-blog-forestry/app.js
2016-02-20 12:31:34 -08:00

10 lines
275 B
JavaScript

exports.loadContext = function (callback) {
let context = require.context('./pages', true)
if (module.hot) {
module.hot.accept(context.id, () => {
context = require.context('./pages', true)
return callback(context)
})
}
return callback(context)
}