fix(gulp): run babel-node with inspect flag in debug (#16901)

This commit is contained in:
mrugesh mohapatra
2018-03-23 20:18:13 +05:30
committed by Stuart Taylor
parent 667dd81e6a
commit 9fa10c9f38

View File

@ -170,11 +170,17 @@ function delRev(dest, manifestName) {
gulp.task('serve', function(cb) {
let called = false;
let execParams = path.normalize('node_modules/.bin/babel-node');
// When in development we can spawn a node debugger
// https://nodejs.org/en/docs/inspector/
if (__DEV__) {
execParams = execParams + ' --inspect';
}
const monitor = nodemon({
script: paths.server,
ext: '.jsx .js .json',
ignore: paths.serverIgnore,
exec: path.normalize('node_modules/.bin/babel-node'),
exec: execParams,
env: {
NODE_ENV: process.env.NODE_ENV || 'development',
DEBUG: process.env.DEBUG || 'fcc:*',