softonic / axios-retry

Axios plugin that intercepts failed requests and retries them whenever possible
Other
1.9k stars 167 forks source link

Latest change (v3.2.0) causes error in older browser versions #177

Closed nick-fytros closed 3 years ago

nick-fytros commented 3 years ago

Hello,

With the latest change added there are issue when running it in older browser version. The error is Uncaught SyntaxError: Unexpected token function and it's due to the async keyword at https://github.com/softonic/axios-retry/blob/4f62bc889ce2c1f525c6947672630c1eaf2f2241/es/index.js#L129. The target babel target is es2015 which doesn't support async functions. It should either change to a promise based implementation or get the babel configuration updated so that async is transpiled.

Thanks