arielfaur / ionic-audio

An audio player for Ionic 3 and Angular 4. Works with HTML 5 audio or native audio using Cordova Media plugin.
http://arielfaur.github.io/ionic-audio/2.0/index.html
MIT License
321 stars 163 forks source link

Fix for issue #121 #127

Closed stefanheule closed 7 years ago

stefanheule commented 7 years ago

Some of the angular dependencies need to be peer dependencies for AOT to work. Here's a description: https://medium.com/@isaacplmann/making-your-angular-2-library-statically-analyzable-for-aot-e1c6f3ebedd5

I believe this should fix issue #121.

It might also be nice to be less strict in the rest of the dependencies (e.g., use "@angular/http": "^4.0.0" instead of the strict only 4.0.0 used right now). Let me know if that sounds like a good idea and I can do another pull request.

arielfaur commented 7 years ago

@stefanheule I came across that article last week while doing a bit of research. Have you tested this? Does it solve the issue?

stefanheule commented 7 years ago

I'm not super familiar with node packages, but here is what I did: I tried to build the demo project after updating to the latest version of all packages, and the build fails with the error message from #121. Then, I applied the changes from this pull request to ionic-audio, and again tried to build the demo project with the updated dependencies, and now it works.

So yes, I think this does solve the issue.

sfaizanh commented 7 years ago

You have to move all the dependencies to devDependencies and npm build before npm publish Ref: https://github.com/arielfaur/ionic-audio/pull/102/files?diff=unified#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R14

sfaizanh commented 7 years ago

Hey @stefanheule can you test and confirm #131 https://github.com/arielfaur/ionic-audio/pull/131#issuecomment-306937752 this will be helpful

stefanheule commented 7 years ago

Yes. I'll close this pull request in favor of #131 then.