AgoraIO-Community / Angular-Agora-RTC

11 stars 16 forks source link

Angular 7 optimization breaks script #3

Open mordka opened 5 years ago

mordka commented 5 years ago

Angular 7 introduced terser as the default minifier which seems breaking included agora SDK. After compiling production build, the javascript breaks with the following runtime error:

main.d0bf7f26789e80a5d773.js:1 ERROR TypeError: i.default.debug is not a function
    at u (main.d0bf7f26789e80a5d773.js:1)
    at n (main.d0bf7f26789e80a5d773.js:1)
    at t.getGatewayList (main.d0bf7f26789e80a5d773.js:1)
    at Object.t.join (main.d0bf7f26789e80a5d773.js:1)
    at e.ngOnInit (main.d0bf7f26789e80a5d773.js:1)
    at main.d0bf7f26789e80a5d773.js:1
    at main.d0bf7f26789e80a5d773.js:1
    at Qg (main.d0bf7f26789e80a5d773.js:1)
    at _y (main.d0bf7f26789e80a5d773.js:1)
    at Object.updateDirectives (main.d0bf7f26789e80a5d773.js:1)
sbokatuk commented 5 years ago

having same issue on calling client.Join()

digitallysavvy commented 5 years ago

@mordka @sbokatuk Please take a look at an updated repo from the Agora Developer Community: https://github.com/drew-thompson/ngx-agora

(thanks @drew-thompson!)