google / google/closure-compiler

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

Open
#3,149 6 comments 0 reactions 1 assignee Assigned to @ChadKillingsworth View on GitHub
triage-done
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

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

```fs
example/example2.js:3: ERROR - Failed to load module "abc"
import abc from 'abc'
^
1 error(s), 0 warning(s)
```

```js
node_modules
|-abc
|-build
-- index.js
--package.json
```

`cat package.json`
```
{"name":"abc", "main":"build"}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.