ipld / js-dag-pb

An implementation of the DAG-PB spec for JavaScript (for use with multiformats or @ipld/block)
Other
13 stars 5 forks source link

fix: update import paths to include extension #82

Closed achingbrain closed 1 year ago

achingbrain commented 1 year ago

The import path must include the extension when publishing ESM as otherwise the module loader doesn't know how to find the file.

Fixes errors like:

Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an
extension to the import path.

This is a weakness of JSDoc types.

Refs: https://github.com/multiformats/js-multiformats/issues/249