mirror of
https://github.com/axios/axios.git
synced 2026-04-11 02:11:50 +08:00
fix: issue with exports not working correctly in common js scenarios
This commit is contained in:
parent
9c3dce366b
commit
2149464bb4
@ -14,7 +14,6 @@ import toFormData from './helpers/toFormData.js';
|
||||
import AxiosError from './core/AxiosError.js';
|
||||
import spread from './helpers/spread.js';
|
||||
import isAxiosError from './helpers/isAxiosError.js';
|
||||
import AxiosHeaders from './core/AxiosHeaders.js';
|
||||
|
||||
|
||||
/**
|
||||
@ -75,10 +74,4 @@ axios.formToJSON = thing => {
|
||||
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
||||
};
|
||||
|
||||
export {
|
||||
axios as default,
|
||||
Axios,
|
||||
AxiosHeaders,
|
||||
AxiosError,
|
||||
CanceledError,
|
||||
};
|
||||
export default axios
|
||||
|
||||
@ -77,7 +77,7 @@ export default async () => {
|
||||
file: `dist/node/${name}.cjs`,
|
||||
format: "cjs",
|
||||
preferConst: true,
|
||||
exports: "named",
|
||||
exports: "default",
|
||||
banner
|
||||
},
|
||||
plugins: [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user