gulp-minify creates errors in javascript

35 views Asked by At

My javascript files are throwing errors, because some functions are not loaded correctly, but only in the minified version.

Can anybody give me tips on how to find pieces of code that can create errors in "translation" so I can find those pieces and test if these are the "bad" ones?

I would do it the other way around but my files are up to 10 000 lines big so it's quite a hassle to debug those files.

PS: I am using [email protected] with [email protected].

1

There are 1 answers

0
bartolaus On

So I came up with a solution myself:

The error stem from a check against the names of a functions arguments, that were renamed in the minification process. Therefore the check was failing everytime.

I used the mangle: false option of gulp-minify to prevent renaming.