Apparently the default Cmd JS optimizer has some problems with ES2015 JS notations:

Code:
let myLongVariableName = 'foo';

...

myLongVariableName = 'bar';

const myObject = {
  myLongVariableName
}
This will be converted to something like:

Code:
let a = 'foo';

a = 'bar';

const b = {
  myLongVariableName
}
... and lead to an exception because 'myLongVariableName' is undefined.

It will work when not using the shorthand, like:

Code:
const b = {
  myLongVariableName: myLongVariableName
}
which will be converted to:

Code:
const b = {
  myLongVariableName: a
}
This is the compressor directive from my app.json:

Code:
"compressor": {
         "type": "cmd"
      }
So, while it'S quite easy to adjust the code to fix this, it seems that the optimizer is not fully compatible with ES2015 notation.