Tôi có nhiệm vụ sau đây:Tại sao không gulp-uglify mangling tên biến của tôi?
var uglify = require('gulp-uglify');
gulp.task('scripts', function() {
gulp.src('./src/scripts/*.js')
.pipe(concat('main.js'))
.pipe(uglify())
.pipe(gulp.dest('./dist'));
});
Và 2 file javascript sau, test1.js:
var testOneOutput = 'function one';
console.log(testOneOutput);
Và test2.js
var testTwoOutput = 'function two';
console.log(testTwoOutput);
Và tất cả các thư mục được thiết lập đúng. Mặc dù khi tôi thực hiện nhiệm vụ, tôi không có dấu hiệu cho thấy công việc làm xấu. Các nối hoạt động tuyệt vời mặc dù. Tui bỏ lỡ điều gì vậy?