dopecodez / dopecodez/Wikipedia

ESM format issues

Open
#80 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
102
Forks
21
PR merge metrics
No merged PRs in 30d

Description

It seems that `index.js` in current 2.4.2 version is not a proper ES module, even though it appears to be intended as one.

The file still has CommonJS semantics, like `require` and `exports.default`.

When I try to use it in my ESM environment, importing `import wiki from 'wikipedia';` doesn't work.

It returns an object with `default` in it and I need to unwrap it to access functions like `page`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.