Yellow boxes for HMR errors

Reviewed By: vjeux

Differential Revision: D2795143

fb-gh-sync-id: fd5c92af511258bb1252d991e994a8c37657644e
This commit is contained in:
Martín Bigio 2015-12-30 10:07:55 -08:00 committed by facebook-github-bot-5
parent 2ab3fe921b
commit eed6dde1d4
1 changed files with 5 additions and 3 deletions

View File

@ -99,18 +99,20 @@
var mod = modules[id];
if (!mod) {
console.error(
console.warn(
'Cannot accept unknown module `' + id + '`. Make sure you\'re not ' +
'trying to modify something else other than a module ' +
'(i.e.: a polyfill).'
);
return;
}
if (!mod.module.hot) {
console.error(
console.warn(
'Cannot accept module because Hot Module Replacement ' +
'API was not installed.'
);
return;
}
if (mod.module.hot.acceptCallback) {
@ -120,7 +122,7 @@
mod.module.hot.acceptCallback();
} else {
console.log(
console.warn(
'[HMR] Module `' + id + '` can\'t be hot reloaded because it ' +
'doesn\'t provide accept callback hook. Reload the app to get the updates.'
);