mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
docs: add es6 example
This commit is contained in:
@@ -153,6 +153,12 @@ const axios = require('axios');
|
||||
console.log(axios.isCancel('something'));
|
||||
```
|
||||
|
||||
For some bundlers and some ES6 linter's you may need to do the following:
|
||||
|
||||
```js
|
||||
import { default as axios } from 'axios';
|
||||
```
|
||||
|
||||
For cases where something went wrong when trying to import a module into a custom or legacy environment,
|
||||
you can try importing the module package directly:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user