Closed kgiszewski closed 7 years ago
Turns out that one JS script had a 'use strict' whilst another had a missing var
for a variable. This wasn't CDF's fault :)
CDF isn't smart ;) it doesn't know what strict is and it doesn't generate an AST it's just a very fast forward reading JS parser that knows a few simple rules. In most cases any JS issues that appear after CDF has minified things is due to invalid JS even if those invalid JS items are actually 'valid' under very loose JS rules. A lot of times this shows up because people don't put a semi colon after 'strict' which is actually a requirement. In rare cases though , it's a bug with JSMin which i've been fixing over the years: https://github.com/Shazwazza/JsMinSharp
Using v1.9.2 on Umbraco Cloud. It breaks when some JS isn't conforming to 'use strict`.
Quick fix is to disable by
compilation debug='true'
, long term fix is to rummage thru old packages that do not conform tostrict
js.Possible to disable the
use strict
?