skeeks-semenov / yii2-assets-auto-compress

Automatic compilation of js + css + html
https://skeeks.com/
BSD 3-Clause "New" or "Revised" License
157 stars 43 forks source link

Issue with Compressing Regex #24

Open ChrGriffin opened 7 years ago

ChrGriffin commented 7 years ago

{return/^(?:(?:https?|file)\:)?\/\//.test(e)}

becomes:

{return/^(?:(?:https?|file)\:)?\/\}

When it's compressed. As you can see, not just the end of the regex, but the following function call, are removed. Based on the fact that the regex ends with '//', I assumed it might be something to do with automatically removing comments. But I added:

'jsFileCompressFlaggedComments' => FALSE

To my config, and the error persisted. So I'm not sure what might be causing the problem.

cshehadi commented 4 years ago

I have the same issue. I had to turn off js file compression. Any hope for a fix for this?