From af7b875a182994e44a7e076e8ac0ed15cc0a298d Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Mon, 17 Jul 2017 11:11:37 +0530 Subject: [PATCH] Make sure module.context exist always (#2580) Fixes #2578 --- server/build/webpack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/build/webpack.js b/server/build/webpack.js index f0c6d7d2..bec4ecd7 100644 --- a/server/build/webpack.js +++ b/server/build/webpack.js @@ -106,7 +106,7 @@ export default async function createCompiler (dir, { dev = false, quiet = false, // We need to move react-dom explicitly into common chunks. // Otherwise, if some other page or module uses it, it might // included in that bundle too. - if (module.context.indexOf(`${sep}react-dom${sep}`) >= 0) { + if (module.context && module.context.indexOf(`${sep}react-dom${sep}`) >= 0) { return true }