JustinBeckwith/retry-axios

Doesn't seem to work with IMPORT rax

iDVB opened this issue · 1 comments

iDVB commented

Does NOT work

import axios from 'axios';
import rax from 'retry-axios';
console.log('TEST', rax);   // TEST undefined

WORKS

import axios from 'axios';
const rax = require('retry-axios');
console.log('TEST', rax);   // TEST { attach: [Function: attach], detach: [Function: detach], getConfig: [Function: getConfig] }

Is something up with the way this was packaged that would prevent it from being imported when working with webpack+babel?

Greetings! You need to use import * as rax from 'retry-axios' :) See:
https://github.com/JustinBeckwith/retry-axios#usage