0

The uncompress version works fine, but the compressed and minified do not.

gulp.task('adtag', function () {
  // set up the browserify instance on a task basis
  var b = browserify({
    entries: './src/adtag/main.js',
    debug: true
  }).transform(envify({
        NODE_ENV: 'production'
  })).transform(babelify.configure({
        plugins: ['transform-object-assign']
  }));

  return b.bundle()
    .pipe(source('smaatoAdTag.min.js'))
    .pipe(buffer())
    .pipe(sourcemaps.init({loadMaps: true}))
        // Add transformation tasks to the pipeline here.
        .pipe(uglify())
        .on('error', gutil.log)
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest('./dist/adtag/'));
});

If i "uncompress" the minified version, everything works

ayxos
  • 408
  • 1
  • 7
  • 15
  • Are you attempting to output ES6? I see you only have `transform-object-assign` in your list. Uglify does not support ES6. – loganfsmyth Mar 21 '17 at 19:15
  • No, i attempt to output ES5 – ayxos Mar 22 '17 at 08:55
  • 1
    Do you have other presets configured like `es2015`? You also need to clarify "does not work" so it is unclear what issue you are having. What is the actual error you get? – loganfsmyth Mar 22 '17 at 17:15

0 Answers0