Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: switch to esm #3879

Merged
merged 29 commits into from
Sep 22, 2021
Merged

feat: switch to esm #3879

merged 29 commits into from
Sep 22, 2021

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Sep 19, 2021

Refactors the code to be ESM. Dual publishes CJS and ESM for maximum compatibility.

There are no default exports, so code similar to:

import IPFS from 'ipfs'

const ipfs = await IPFS.create()

should be refactored to:

import { create } as IPFS from 'ipfs'

const ipfs = await create()

BREAKING CHANGE: There are no default exports and everything is now dual published as ESM/CJS

SgtPooki referenced this pull request in ipfs/js-kubo-rpc-client Aug 18, 2022
Refactors the code to be ESM.  Dual publishes CJS and ESM for maximum compatibility.

There are no default exports, so code similar to:

```js
import IPFS from 'ipfs'

const ipfs = await IPFS.create()
```

should be refactored to:

```js
import { create } as IPFS from 'ipfs'

const ipfs = await create()
```

BREAKING CHANGE: There are no default exports and everything is now dual published as ESM/CJS
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant