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

Mandatory file extensions #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

modernizer-bot
Copy link

A file extension must be provided when using the import keyword to resolve relative or absolute specifiers. Directory indexes (e.g. './startup/index.js') must also be fully specified.

This behavior matches how import behaves in browser environments, assuming a typically configured server.

Ref: https://nodejs.org/docs/latest-v17.x/api/esm.html#mandatory-file-extensions

(Even if you perhaps using require() and extension-less paths, using extension can help with the migration to esm later)


Hi, I'm experimenting with a github bot to do quality checks and sending automated pr that could improve your code.
Sorry if I'm not helpful.

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.

1 participant