Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update import paths to include extension #82

Merged
merged 1 commit into from
May 11, 2023

Conversation

achingbrain
Copy link
Member

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: multiformats/js-multiformats#249

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 and would be caught by converting
to TypeScript.

Refs: multiformats/js-multiformats#249
@achingbrain achingbrain requested a review from rvagg May 9, 2023 12:28
@achingbrain achingbrain merged commit 9fe97e3 into master May 11, 2023
@achingbrain achingbrain deleted the fix/update-import-paths-to-include-extension branch May 11, 2023 06:13
github-actions bot pushed a commit that referenced this pull request May 11, 2023
## [4.0.3](v4.0.2...v4.0.3) (2023-05-11)

### Bug Fixes

* update import paths to include extension ([#82](#82)) ([9fe97e3](9fe97e3))

### Dependencies

* **dev:** bump aegir from 38.1.8 to 39.0.5 ([#81](#81)) ([e2de671](e2de671))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants