Closed andresriancho closed 10 years ago
"grunt-contrib-uglify": "~0.6.0" also breaks this library
That portion of code from your error, is not in this package but in the Google API itself. So i think this may be caused by something else. Could you please put a breakpoint there and inspect the stack to see if you find something odd ?
We are using uglify 0.4.0 with this library without any issues BTW.
Finally, you could use the already minified version of this tool so you don't minify an already minified code.
My index.html looks like this:
<!-- build:js scripts/vendor.js -->
....
<script src="scripts/vendors/recaptcha_ajax.js"></script>
<script src="bower_components/angular-recaptcha/release/angular-recaptcha.min.js"></script>
<!-- endbuild -->
When I moved the recaptcha_ajax.js
outside the build block and changed the address so that my app uses the one provided directly from google servers the error kept appearing. In other words, this also triggers the error:
<script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
<!-- build:js scripts/vendor.js -->
....
<script src="bower_components/angular-recaptcha/release/angular-recaptcha.min.js"></script>
<!-- endbuild -->
Also tried to use the non-min version of your JS library (inside the build block) to avoid the double minification and it failed.
Any ideas?
No ideas here. Could you build a small html file to reproduce this and upload it somewhere were we can see it?
Closing this until we can prove that the issue exists. Please feel free to reopen if you come up with an example on how to reproduce it.
I'm using
grunt-contrib-uglify
version~0.4.0
to uglify my code before sending it to S3. It all works like a charm until I add angular-recaptcha to the mix. Then the javascript console log says:Cannot use 'in' operator to search for 'RecaptchaTemplates' in undefined
Not a JS expert here, but I've seen other libraries where they apply some minor changes to allow minification/uglification (if that word exists?).
Anyways, it might be a good idea to investigate this a little bit further and either:
grunt-contrib-uglify
team