Hot reload pages and config
This commit is contained in:
parent
2cf7d346cb
commit
bdee83820e
1 changed files with 9 additions and 2 deletions
11
app.coffee
11
app.coffee
|
|
@ -1,2 +1,9 @@
|
||||||
exports.context = ->
|
exports.loadContext = (callback) ->
|
||||||
return require.context './pages', true
|
context = require.context './pages', true
|
||||||
|
if module.hot
|
||||||
|
module.hot.accept(context.id, ->
|
||||||
|
context = require.context './pages', true
|
||||||
|
callback context
|
||||||
|
)
|
||||||
|
|
||||||
|
callback context
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue