1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

fix(bin/next:inspect): Allow node inspect flag to be used (#4160)

This accepts arguments to a node --inspect flag as well as other debugging node flags.

Resolves #4151
This commit is contained in:
Ari Leo Frankel 2018-05-25 08:10:55 -05:00 committed by Tim Neutkens
parent 2b16d8b2ac
commit 9b88eef897

View file

@ -32,8 +32,9 @@ if (new Set(['--version', '-v']).has(cmd)) {
process.exit(0)
}
if (new Set(process.argv).has('--inspect')) {
nodeArgs.push('--inspect')
const inspectArg = process.argv.find(arg => arg.includes('--inspect'))
if (inspectArg) {
nodeArgs.push(inspectArg)
}
if (new Set(['--help', '-h']).has(cmd)) {