Here is the code snippet that triggers a Callstack Size Exceeded Error:
declare var createjs:any;
import {Animation} from '../animation';
import {Events} from 'ionic-angular';
import { Inject } from '@angular/core';
export class FischSuccess extends Animation {
constructor(@Inject(Events) public events: Events) {
super(events);
this.initAnimation();
}
initAnimation() {
var lib, images, ss;
(function (lib, img, cjs, ss, events) {
var cjs = createjs;
var p;
lib.webFontTxtFilters = {};
// library properties:
lib.properties = {
width: 1000,
height: 650,
fps: 25,
color: "#FFFFFF",
opacity: 1.00,
webfonts: {},
manifest: [
{src:"images/fisch_atlas_success.png", id:"fisch_atlas_"}
]
};
lib.ssMetadata = [
{name:"fisch_atlas_", frames: [[158,0,156,110],[0,0,156,110],[316,0,156,110],[0,112,156,110],[158,112,156,110]]}
];
lib.webfontAvailable = function(family) {
lib.properties.webfonts[family] = true;
var txtFilters = lib.webFontTxtFilters && lib.webFontTxtFilters[family] || [];
for(var f = 0; f < txtFilters.length; ++f) {
txtFilters[f].updateCache();
}
};
// symbols:
(lib.Fisch1 = function() {
this.spriteSheet = ss["fisch_atlas_"];
this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite();
(lib.Fisch2 = function() {
this.spriteSheet = ss["fisch_atlas_"];
this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite();
// More symbol definitions...
// stage content:
// Timeline animations...
...
})(lib = lib||{}, images = images||{}, createjs = createjs||{}, ss = ss||{}, this.events);
this.animationInit = this.setupAnimations(ss, images, lib, createjs);
}
}
This piece of code was mainly auto-generated and adapted to work with Angular 5 along with some event handling.
The issue occurs when compiling with the --prod flag in Ionic or using the tsc command. Compiling without the --prod flag works as expected.