ipfs-shipyard / is-ipfs

A set of utilities to help identify IPFS resources on the web
https://www.npmjs.com/package/is-ipfs
Other
126 stars 22 forks source link

Support for CommonJS #61

Closed vikiival closed 9 months ago

vikiival commented 2 years ago

Problem

Hello I want to use is-ipfs package in https://github.com/subsquid project. However this package does not support CommonJS.

Solution

Ideally export CommonJS files as .cjs and ESM as .mjs Not sure if aegir (esmbuild) can support that.

Blocker

The support could be blocked by https://github.com/multiformats/js-multiformats/issues/220

achingbrain commented 9 months ago

This module is ESM only - you can use dynamic imports to load it from CJS.