phaser3-rex-notes
phaser3-rex-notes copied to clipboard
minimizer (Terser, UglifyJs) has parse error on roundRentagle.js
ERROR in public/js/bundle.js from Terser Unexpected token: punc ()) [public/js/bundle.js:180944,8]
the error is solved if I rewrite the function from
get radius() {
var radius = this.cornerRadius;
return Math.max(
radius.tl.x, radius.tl.y,
radius.tr.x, radius.tr.y,
radius.bl.x, radius.bl.y,
radius.br.x, radius.br.y,
)
}
to
get radius() {
var radius = this.cornerRadius;
var max = Math.max(
radius.tl.x,
radius.tl.y,
radius.tr.x,
radius.tr.y,
radius.bl.x,
radius.bl.y,
radius.br.x,
radius.br.y
);
return max;
}
in ./plugins/gameobjects/shape/roundrectangle/geom/RoundRectangle.js
I don't understand why this happens...
I had changed that code for this issue.