From 6f56d87d3732959aba7a64c5d87e329398dd205e Mon Sep 17 00:00:00 2001 From: Anton Korzunov Date: Thu, 23 May 2019 20:32:47 +1000 Subject: [PATCH] fix: disable RHL when NODE_ENV == test, fixes #1252 --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index cd09abefe..2ac074c13 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,8 @@ if (process.env.NODE_ENV === 'production') { module.exports = require('./dist/react-hot-loader.production.min.js'); +} else if (process.env.NODE_ENV === 'test') { + module.exports = require('./dist/react-hot-loader.production.min.js'); } else if (typeof window === 'undefined') { // this is just server environment module.exports = require('./dist/react-hot-loader.production.min.js');