TLDR：

> Oh, yeah I don't think we will ever export that.

https://github.com/axios/axios/issues/5000#issuecomment-1311350960

<!-- Click "Preview" for a more readable version --

Please read and follow the instructions before submitting an issue:

- Read all our documentation, especially the [README](https://github.com/axios/axios/blob/master/README.md). It may contain information that helps you solve your issue.
- Ensure your issue isn't already [reported](https://github.com/axios/axios/issues?utf8=%E2%9C%93&q=is%3Aissue).
- If you aren't sure that the issue is caused by Axios or you just need help, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/axios) or [our chat](https://gitter.im/mzabriskie/axios).
- If you're reporting a bug, ensure it isn't already fixed in the latest Axios version.
- Don't remove any title of the issue template, or it will be treated as invalid by the bot.

⚠️👆 Feel free to these instructions before submitting the issue 👆⚠️
-->

#### Is your feature request related to a problem? Please describe.

Yes. I'm writing a adaptor to be used in userscript like tampermonkey or Violentmonkey, 
it use a xhr provided be broser extension `GM.xmlHttpRequest` to make cors request.

And to make it behavior like axios' xhr adaptor, I'm using some axios' helper functions directly by 

```ts
import buildFullPath from "axios/lib/core/buildFullPath";
import settle from "axios/lib/core/settle";
import buildURL from "axios/lib/helpers/buildURL";
import parseHeaders from "axios/lib/helpers/parseHeaders";
import utils from "axios/lib/utils";
```

But after axios **1.0.0** is released, a `exports` field is added to package.json, and lib directory is no longer exported anymore, this make me unable to use helper function provided by axios anymore.

https://github.com/axios/axios/blob/484aa4fe6addccbd32206a31eb3d2d000843066e/package.json#L6-L17

modern js bundler will raise a error for this: `Package subpath './lib/core/buildFullPath' is not defined by "exports" in .../node_modules/axios/package.json` by bundler.

#### Describe the solution you'd like

add `lib` dir to `package.json#exports`

test/module/esm/index.js
import assert from 'assert';
import axios, {CanceledError, AxiosError, AxiosHeaders} from 'axios';
assert.strictEqual(typeof axios, 'function');
assert.strictEqual(typeof CanceledError, 'function');
assert.strictEqual(typeof AxiosError, 'function');
assert.strictEqual(typeof AxiosHeaders, 'function');
assert.strictEqual(axios.CanceledError, CanceledError);
assert.strictEqual(axios.AxiosError, AxiosError);
assert.strictEqual(axios.AxiosHeaders, AxiosHeaders);
console.log('ESM importing test passed');