mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
fix: eep top-level export same with static properties (#5109)
* chore: add necessary devDependencies for rollup build * fix: keep top-level export same with static properties(#5031) Co-authored-by: ronggui.shu <ronggui.shu@sci-inv.com> Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -1,2 +1,32 @@
|
|||||||
import axios from './lib/axios.js';
|
import axios from './lib/axios.js';
|
||||||
|
|
||||||
|
// Keep top-level export same with static properties
|
||||||
|
// so that it can keep same with es module or cjs
|
||||||
|
const {
|
||||||
|
Axios,
|
||||||
|
AxiosError,
|
||||||
|
CanceledError,
|
||||||
|
isCancel,
|
||||||
|
CancelToken,
|
||||||
|
VERSION,
|
||||||
|
all,
|
||||||
|
Cancel,
|
||||||
|
isAxiosError,
|
||||||
|
spread,
|
||||||
|
toFormData
|
||||||
|
} = axios;
|
||||||
|
|
||||||
export default axios;
|
export default axios;
|
||||||
|
export {
|
||||||
|
Axios,
|
||||||
|
AxiosError,
|
||||||
|
CanceledError,
|
||||||
|
isCancel,
|
||||||
|
CancelToken,
|
||||||
|
VERSION,
|
||||||
|
all,
|
||||||
|
Cancel,
|
||||||
|
isAxiosError,
|
||||||
|
spread,
|
||||||
|
toFormData
|
||||||
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://axios-http.com",
|
"homepage": "https://axios-http.com",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.18.2",
|
||||||
"@babel/preset-env": "^7.18.2",
|
"@babel/preset-env": "^7.18.2",
|
||||||
"@rollup/plugin-babel": "^5.3.1",
|
"@rollup/plugin-babel": "^5.3.1",
|
||||||
"@rollup/plugin-commonjs": "^15.1.0",
|
"@rollup/plugin-commonjs": "^15.1.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user