Closed mii9000 closed 8 years ago
This may be a rc5/mangle issue, the following issue link helped solve my problem.
@canhamd Thanks. But I am not on RC5 rather on Beta 8 and cannot update unfortunately.
I've also been on Beta 8 in the past and observed the same issue. Its an Angular issue not a SystemJS Bug. They had similar issues like 10618 also in their beta - most probably because of using Function.name
somewhere in their code. UglifyJS tells people to be careful with mangling because statements like if (myFunc.name === "foo")
obviously assumes myFunc could be 'foo' but after minification there won't be oo anymore. You've found the right options to use with UglifyJS. Try also using keep_fnames=true
.
Not SystemJS problem
I create an Angular 2 bundle of my app using the following config.
gulpfile.js
If the
{ minify: true }
then the bundle keeps on executing some code and overflows the tab before the browser/tab crashes. If I{ minify: false }
or{ minify: true }, { mangle: false }
then the bundle runs file as expected. What could be the reason for this? I need to mangle so that the bundle size can go low as possible. Any help is appreciated.