From e56237515a00ada6dd790969175a98b48d5d5685 Mon Sep 17 00:00:00 2001 From: Anton Korzunov Date: Thu, 1 Aug 2019 22:00:12 +1000 Subject: [PATCH] fix: add noRegister option to webpack, #1315 --- src/webpack/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webpack/index.js b/src/webpack/index.js index bffc84d38..dee355956 100644 --- a/src/webpack/index.js +++ b/src/webpack/index.js @@ -36,7 +36,8 @@ function transform(source, map) { if (options.withPatch) { source = patch(source); } - if (source.indexOf('reactHotLoader.register') > 0) { + + if (source.indexOf('reactHotLoader.register') > 0 || options.noRegister) { return callback(null, source, map); } // This is a Webpack loader, but the user put it in the Babel config.