This repository was archived by the owner on Mar 4, 2020. It is now read-only.
chore: Set packages' "main" to src/index locally to help type resolution#2253
Open
ecraig12345 wants to merge 3 commits intomasterfrom
Open
chore: Set packages' "main" to src/index locally to help type resolution#2253ecraig12345 wants to merge 3 commits intomasterfrom
ecraig12345 wants to merge 3 commits intomasterfrom
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes to resolution of internal packages will hopefully make removing aliases in #2243 (and various other work) go more smoothly and prevent the relative paths in inferred types issue.
Remove
tsconfig.jsonpathswhere possible, since that seems to cause the relative import issue. Instead, inpackage.jsonset"main": "src/index.ts"(and add a pre-publish task to switch it back). This is what @kenotron did in staging and it lets imports from the package root work without apathsconfig.I also removed the the
types,module, andjsnext:mainsettings from mostpackage.jsons, and updated the pre-publish task to add them back. Havingtypesdefined as a generated file (even withmainpointing tosrc) definitely seemed to prevent references from working properly, but I thought I'd also remove the other two for consistency?Other related changes:
packages/reactfromincludes of other projects and use dependencies instead.docsprojectcomposite: truesettings