1

I'm running in an issue since a few weeks that I couldn't resolve so far. The problem is that my generated js that is used as cache by my application contains inline // that basically fail when interprated by the browser.

Now, I'm looking for the source, in first place I thought JSMinPlus was bad and didn't remove the comments, but it does. The problem looks like being due to the size of the file (1Mo, 1.5M chars) and at a certain point (~750000 chars) the comments are not removed anymore.

I opened an issue on the repo, here: https://code.google.com/p/minify/issues/detail?id=308

To be sure it's due to the size, I made a test by executing twice my code and creating two different files in the cache, the second much smaller than the first one.

The result is clear enough for me:

If I import all my files: https://gist.githubusercontent.com/Vadorequest/10422717/raw/636fdd6c377424dbc9baea86a76217a4f240fc7f/default.js

If I import just a few libraries: https://gist.github.com/Vadorequest/10422779

Please search for "fancybox/jquery-fancybox-thumbs.js" and compare between both files.

I'm not sure the file size or memory used is related to the problem, at a certain point it doesn't delete the comments anymore.

Did you ever encountered this issue? Do you have any idea about what I could do?

Vadorequest
  • 16,593
  • 24
  • 118
  • 215

0 Answers0