Skip to content

Packages with dir as "main" in package.json do not resolve. #3149

@zavr-1

Description

@zavr-1

When trying to import a package that has a directory as its "main" field, there will be an error

example/example2.js:3: ERROR - Failed to load module "abc"
import abc from 'abc'
^
1 error(s), 0 warning(s)
node_modules
|-abc
  |-build
    -- index.js
  --package.json

cat package.json

{"name":"abc", "main":"build"}

Metadata

Metadata

Labels

triage-doneHas been reviewed by someone on triage rotation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions