Search code examples
gulpnodemon

How to set nodemon cli config option '-L' to gulp-nodemon?


I tried to set nodemon -L (--legacy-watch) option as a nodemon config for gulp-nodemon as adding it with null string value in the following but it did not work. Can anyone help?

    gulp.task('server', function () {
            nodemon({
            script: 'server.js',
            watch: paths.server,
            env: { 'NODE_ENV': 'development' },
            'legacy-watch': ''
        }).on('restart', 'lint');
    });

Solution

  • You do:

    legacyWatch: true
    

    All options with a dash are referred to with camelcase when being required.