I get this warning when using Grunt and grunt-ng-annotate.
There is no reference in the warning to where the error is in the file, which makes debugging it hard.
Any ideas?
The issue turned out to be use of ES6 notation, in this case arrow functions (=>), default parameters and let.
I haven't looked in detail as to why ngAnnotate doesn't support this.
To find where the issues were I overrode the ngAnnotate warning with grunt switch --force and later in the build uglify complained about the ES6 syntax with more detail.
Possible reasons:
() => {}
{ value }
let
function (...args)
function (defaultVar = false)
Solutions:
function () {}
{ value: value }
var
function (args)
function (defaultVar) { defaultVar = (defaultVar === undefined) ? false : defaultVar }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With