diff --git a/src/hot.dev.js b/src/hot.dev.js index 76a0884ea..751d0fba3 100644 --- a/src/hot.dev.js +++ b/src/hot.dev.js @@ -64,16 +64,19 @@ const makeHotExport = (sourceModule, moduleId) => { }); } } + } else { + logger.warn('React-hot-loader: Hot Module Replacement is not enabled'); } }; const hot = sourceModule => { - if (!sourceModule || !sourceModule.hot) { + if (!sourceModule) { // this is fatal - throw new Error('React-hot-loader: `hot` could not find the `hot` method in the `module` you have provided'); + throw new Error('React-hot-loader: `hot` was called without any argument provided'); } const moduleId = sourceModule.id || sourceModule.i || sourceModule.filename; if (!moduleId) { + console.error('`module` prodived', sourceModule); throw new Error('React-hot-loader: `hot` could not find the `name` of the the `module` you have provided'); } const module = hotModule(moduleId);