I am using gulp-terser to process my javascript file before deployment. The following works fine..
console.log('test');
But this does not...
window.onload=function(){
console.log('test');
}
The resulting gulped file looks like this...
window.onload=function(){}
Whatever is inside the onload gets removed, anyone any ideas why gulp-terser is behaving like this?