2
0
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:
Jay
2024-10-28 16:10:15 +02:00
committed by GitHub
parent cda671af81
commit 76dc3e6836
+6
View File
@@ -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: