chenqingspring / ng-lottie

Render After Effects animations on Angular based on lottie-web
MIT License
340 stars 100 forks source link

Error on ng build -prod #9

Closed johnkim1x4 closed 7 years ago

johnkim1x4 commented 7 years ago

Hi, So I have no issues compiling the project for development, but when running ng build -prod to deploy I get this error:

Unexpected token: name (LottieAnimationViewModule) [vendor.026c3e2abdba0940e77a.bundle.js:26365,6]

Any help would be appreciated. Thank you.

chenqingspring commented 7 years ago

Could you please provide more logs here? I guess it due to uglify in AOT mode..

johnkim1x4 commented 7 years ago

more logs? that's really the only error I get after I run ng build. I searched google and it says it's related to how uglify doesn't support es6, so I'm just wondering if there's a workaround for that.

chenqingspring commented 7 years ago

Please use ng-lottie@0.2.0 which I exported as es5. Here is a demo works with ng build -prod

johnkim1x4 commented 7 years ago

It worked! Thank you!! 👍