The webpack documentation for the HMR API mentions the following method:
accept(dependencies: string[], callback: (updatedDependencies) => void) => void
I understand how I can accept a single dependency but am unsure how the callback for multiple dependencies should look like.
Here's my code:
var $ = require('jquery')
var page = require('page')
var index = require('./index')
var home = require('./home')
$(function() {
page('/', index)
page('/home', home)
page()
if (module.hot) {
module.hot.accept(['./index', './home'], function(updatedDependencies) {
// what should I put in here?
})
}
})