Fix commonjs & umd exports (#5030)

This commit is contained in:
Ivan Pepelko 2022-10-06 10:59:47 +02:00 committed by GitHub
parent a6e40c3bb2
commit 7a06a3616f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -75,12 +75,10 @@ axios.formToJSON = thing => {
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
};
export default axios;
export {
axios as default,
Axios,
AxiosHeaders,
AxiosError,
CanceledError,
};

View File

@ -56,7 +56,7 @@ export default async () => {
file: `dist/${outputFileName}`,
name,
format: "umd",
exports: "default",
exports: "named",
banner
}
}),
@ -77,7 +77,7 @@ export default async () => {
file: `dist/node/${name}.cjs`,
format: "cjs",
preferConst: true,
exports: "default",
exports: "named",
banner
},
plugins: [