yii2-assets-auto-compress icon indicating copy to clipboard operation
yii2-assets-auto-compress copied to clipboard

Issue with Compressing Regex

Open ChrGriffin opened this issue 8 years ago • 1 comments

{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.

ChrGriffin avatar Nov 19 '16 14:11 ChrGriffin

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

cshehadi avatar Feb 10 '20 17:02 cshehadi