Import compatibility with ES modules in 2025
Open
- Dominant language
- JavaScript
- Stars
- 51
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for this library! I had some trouble using this with ES modules. So I wanted to share how I was able to import it and use it for others.
The default import object as it's currently implemented: `import extractDate from 'extract-date';`
Seems to have nested defaults:
```
[Object: null prototype] {
__esModule: true,
default: { default: [Function: _default] }
```
So my fix:
```
import * as ed from 'extract-date';
const extractDate = ed.default.default;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.