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

module: deprecate "main" index and extension lookups #36918

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update lib/internal/modules/esm/resolve.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
  • Loading branch information
guybedford and ljharb committed Jan 23, 2021
commit a8208b2a675978c1dc903f1fd53c499419668f6f
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) {
if (main)
process.emitWarning(
`Package ${pkgPath} has a "main" field set to ${JSONStringify(main)}, ` +
`excluding the full extension to the resolved file at "${
`excluding the full filename and extension to the resolved file at "${
path.slice(pkgPath.length)}", imported from ${basePath}.\n Automatic ` +
guybedford marked this conversation as resolved.
Show resolved Hide resolved
'extension resolution of the "main" field is deprecated for ES modules.',
'DeprecationWarning',
Expand Down