Commit af7b875a authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by GitHub

Make sure module.context exist always (#2580)

Fixes #2578
parent 1a02b0ef
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment