Manual:$wgResourceLoaderValidateJS/en

Details
If set to true, JavaScript modules loaded from wiki pages will be parsed prior to minification to validate them.

Parse errors will result in a JS exception being thrown during module load, which avoids breaking other modules loaded in the same request.