jstuckey / gulp-gzip

Gzip plugin for gulp.
MIT License
175 stars 17 forks source link

Uncaught SyntaxError: Invalid or unexpected token #26

Open MuhammadTalhaAfzal opened 7 years ago

MuhammadTalhaAfzal commented 7 years ago

I am using gulp to uglify, concat and compress my javasscripts. When i run all.js script on my website its give me below highlighted error. But if i don't compress and only concat and ugilfy everything works fine than. I don't know why its is giving me this error by compressing.

Uncaught SyntaxError: Invalid or unexpected token

gulp.task('all_scripts', function () {
return gulp.src(['app/app.js', 'app/services/*.js', 'app/directives/*.js', 'app/components/**/*.js', 'app/routing_components/**/*.js'])
.pipe(concat('all.js'))
.pipe(uglify())
.pipe(gzip()) //by commenting this all.js works fine
.pipe(gulp.dest('app'));
});