Skip to content

Output paths for modules too long if main or types is set in package.json #108

Closed
@nonara

Description

@nonara

If we require from a sub-package, the output path will unnecessarily specify the full source path if it is specified in main or types in the package.json

Given:

./packages/pkg-a/package.json

{
  "name": "pkg-a",
  "main": "./subdir/main.js"
}

With mapping: "@packages/*": "./packages/*"

@packages/pkg-a will resolve to ./packages/pkg-a/subdir/main

Preferably, it should simply resolve to ./packages/pkg-a

This would not be a major issue except for the fact that it will break when the browser setting is used. (see related issue: #105)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions