mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
docs: add es6 example
This commit is contained in:
@@ -153,6 +153,12 @@ const axios = require('axios');
|
|||||||
console.log(axios.isCancel('something'));
|
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,
|
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:
|
you can try importing the module package directly:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user