Commit f8978cc2 authored by Connor Davis's avatar Connor Davis Committed by Tim Neutkens

Detect built ins in externals (#7083)

parent 7f4147d4
...@@ -88,8 +88,9 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug = ...@@ -88,8 +88,9 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug =
'string-hash', 'string-hash',
'next/constants' 'next/constants'
] ]
const nodeBuiltins = new Set([...require("repl")._builtinLibs, "constants", "module", "timers", "console", "_stream_writable", "_stream_readable", "_stream_duplex"])
if (notExternalModules.indexOf(request) !== -1) { if (notExternalModules.indexOf(request) !== -1 || nodeBuiltins.has(request)) {
return callback() return callback()
} }
......
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