我是React js.的新手。我仍然得到这个即使我在我的gulp文件中将My Node env设置为production。如何删除此控制台日志。
gulpfile.js
var gulp = require('gulp');
var browserify = require('browserify');
var reactify = require('reactify');
var through2 =require('through2');
var concat = require('gulp-concat');
var plumber = require('gulp-plumber');
var uglify = require('gulp-uglify');
var pump = require('pump');
gulp.task('browserify',function () {
gulp.src('./src/changenametogulpwhenditingmain.js')
.pipe(plumber())
.pipe(through2.obj(function (file,enc,next) {
browserify(file.path,{'debug':true})
.transform('reactify')
.bundle(function (err,res) {
file.contents = res
next(null,file);
});
}))
.pipe(concat('main.js'))
.pipe(gulp.dest('public'))
});
gulp.task('apply-prod-environment', function() {
process.env.NODE_ENV = 'production';
});
gulp.task('default',['apply-prod-environment','browserify']);
gulp.task('watch',function () {
gulp.watch('src/**/*.*',['default']);
});