mirror of https://github.com/webpack/webpack.git
15 lines
345 B
JavaScript
15 lines
345 B
JavaScript
module.exports = function (done, options, callback) {
|
|
return function (err, stats) {
|
|
if (err) return done(err);
|
|
module.hot
|
|
.check(options || true)
|
|
.then(updatedModules => {
|
|
if (!updatedModules) return done(new Error("No update available"));
|
|
if (callback) callback(stats);
|
|
})
|
|
.catch(err => {
|
|
done(err);
|
|
});
|
|
};
|
|
};
|