pressbooks aldine theme the theme used for the front page or default book
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
430 B

/**
* Loop through webpack entry
* and add the hot middleware
* @param {Object} entry webpack entry
* @return {Object} entry with hot middleware
*/
module.exports = (entry) => {
const results = {};
Object.keys(entry).forEach((name) => {
results[name] = Array.isArray(entry[name]) ? entry[name].slice(0) : [entry[name]];
results[name].unshift(`${__dirname}/../helpers/hmr-client.js`);
});
return results;
};