I am using the new JavaScript promise as described here. My question is how do you support older browsers? Is there any light weight promise polyfill available that you guys use?
I am also been searching for tiny Promise polyfills and came up to use es6-promise-polyfill which works for me in any case.
Since I already switched between some polyfills I have placed it behind my BunnyJS as a dependency. This gives me a flexibility and ability to change a polyfill implementation any time without breaking anything in my business code.
github.com/Mevrael/bunny/blob/master/src/polyfill…
So just import 'bunnyjs/src/polyfills/Promise' at the top of your bundle.
Peter Scheler
JS enthusiast
The easy way would be this.
An all-in-one solution.