Skip to content

Mandatory file extensions#7

Open
modernizer-bot wants to merge 1 commit into
gasolin:masterfrom
modernizer-bot:explicit-path-5
Open

Mandatory file extensions#7
modernizer-bot wants to merge 1 commit into
gasolin:masterfrom
modernizer-bot:explicit-path-5

Conversation

@modernizer-bot

Copy link
Copy Markdown

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.

@bishop335 bishop335 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve and save this

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