I am having an issue with my browserify task.
For some reason my browserify task keeps appending the following to the end and I can't see why
, format);
};
});
},{}]},{},[1])
this is the Task:
gulp.task('browserify', function() {
return browserify(sourceFile, {debug:true})
.bundle()
.pipe(source(destFile))
.pipe(gulp.dest(destFolder));
});
and This is the result:
12:[function(require,module,exports){
'use strict';
module.exports = (function ($filter){
return function(input, format){
return $filter('date')(new Date(input *1000), format);
};
});
},{}]},{},[1])), format);
};
});
},{}]},{},[1])
But my watchify task works fine. This is the task
gulp.task('watch-browserify', function() {
var bundler = watchify(sourceFile, {debug:true});
bundler.on('update', rebundle);
function rebundle() {
return bundler.bundle()
.pipe(source(destFile))
.pipe(gulp.dest(destFolder));
}
return rebundle();
});
And this is the result:
12:[function(require,module,exports){
'use strict';
module.exports = (function ($filter){
return function(input, format){
return $filter('date')(new Date(input *1000), format);
};
});
},{}]},{},[1])
Even if I remove the file contents of the file I still get
},{}]},{},[1])e,module,exports){
},{}]},{},[1])
Can help anyone can offer would be great
It appears it was an issue with the version of browserify I was using, I had version installed (7.1) but watchify a different version (3.46.1) hence why that worked, so I changed the version to 3.46.1 and it solved the problem. I did try with the latest version (8.0.3) but had the same issue so sticking with 3.46.1 for now