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: Add file extension to relative imports for better ES module compatibility #76

Closed
wants to merge 1 commit into from

Conversation

daffl
Copy link

@daffl daffl commented Jan 2, 2025

This pull request adds the .js extension and explicit index.js references to all relative imports to comply with the ES module specification and not rely on Node module loader specifics.

Should close #75

dchest added a commit that referenced this pull request Jan 3, 2025
Use node16 module resolution in TypeScript to help catch errors.

Closes #75, #76.
@dchest
Copy link
Member

dchest commented Jan 3, 2025

Thank you for the PR! Would have saved me time if I haven't started doing it before receiving it :) I've committed this: 6d8cbcd which also includes changes to tests and benchmarks, and tsconfig to help catch errors. Will release soon.

@dchest dchest closed this Jan 3, 2025
@daffl daffl deleted the es-extensions branch January 3, 2025 22:24
@daffl
Copy link
Author

daffl commented Jan 3, 2025

It got in, that's what counts :) Thank you for getting this fixed.

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.

Missing File Extension in ESM Imports Breaks Webpack 5 Compatibility
2 participants