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

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

Closed
nonara opened this issue Jun 11, 2021 · 1 comment
Closed
Labels
Bug Something isn't working

Comments

@nonara
Copy link
Collaborator

nonara commented Jun 11, 2021

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)

@nonara nonara added the Bug Something isn't working label Jun 11, 2021
nonara added a commit that referenced this issue Jun 16, 2021
- Several improvements were made for speed and efficiency.
- Now accommodating for new TS empty baseURL provision (closes #109)
- Pre-checking necessity before overwriting paths (closes #110)
- Rewrote core resolution methodology to:
  - Properly handle implicit indexes (closes #106)
  - Properly handle implicit sub-package indexes set via package.json 'main' #108)
  - Not follow symlinks (#107)
  - Resolve from output path as opposed to SourceFile path (#103)
nonara added a commit that referenced this issue Jun 16, 2021
- Several improvements were made for speed and efficiency.
- Now accommodating for new TS empty baseURL provision (closes #109)
- Pre-checking necessity before overwriting paths (closes #110)
- Rewrote core resolution methodology to:
  - Properly handle implicit indexes (closes #106)
  - Properly handle implicit sub-package indexes set via package.json 'main' #108)
  - Not follow symlinks (#107)
  - Resolve from output path as opposed to SourceFile path (#103)
nonara added a commit that referenced this issue Jun 16, 2021
- Several improvements were made for speed and efficiency.
- Now accommodating for new TS empty baseURL provision (closes #109)
- Pre-checking necessity before overwriting paths (closes #110)
- Rewrote core resolution methodology to:
  - Properly handle implicit indexes (closes #106)
  - Properly handle implicit sub-package indexes set via package.json 'main' #108)
  - Not follow symlinks (#107)
  - Resolve from output path as opposed to SourceFile path (#103)
nonara added a commit that referenced this issue Jun 16, 2021
- Several improvements were made for speed and efficiency.
- Now accommodating for new TS empty baseURL provision (closes #109)
- Pre-checking necessity before overwriting paths (closes #110)
- Rewrote core resolution methodology to:
  - Properly handle implicit indexes (closes #106)
  - Properly handle implicit sub-package indexes set via package.json 'main' #108)
  - Not follow symlinks (#107)
  - Resolve from output path as opposed to SourceFile path (#103)
@nonara nonara closed this as completed Jun 16, 2021
@nonara
Copy link
Collaborator Author

nonara commented Jun 16, 2021

Sorted in v3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant