From eed6dde1d41b48ce95778f6f346513163710ccb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Bigio?= Date: Wed, 30 Dec 2015 10:07:55 -0800 Subject: [PATCH] Yellow boxes for HMR errors Reviewed By: vjeux Differential Revision: D2795143 fb-gh-sync-id: fd5c92af511258bb1252d991e994a8c37657644e --- react-packager/src/Resolver/polyfills/require.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/react-packager/src/Resolver/polyfills/require.js b/react-packager/src/Resolver/polyfills/require.js index 15f8cf55..afcda4ca 100644 --- a/react-packager/src/Resolver/polyfills/require.js +++ b/react-packager/src/Resolver/polyfills/require.js @@ -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.' );