Skip to content
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
chore/src-main
Open

chore: Set packages' "main" to src/index locally to help type resolution#2253
ecraig12345 wants to merge 3 commits intomasterfrom
chore/src-main

Conversation

@ecraig12345
Copy link
Copy Markdown
Member

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.json paths where possible, since that seems to cause the relative import issue. Instead, in package.json set "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 a paths config.

I also removed the the types, module, and jsnext:main settings from most package.jsons, and updated the pre-publish task to add them back. Having types defined as a generated file (even with main pointing to src) definitely seemed to prevent references from working properly, but I thought I'd also remove the other two for consistency?

Other related changes:

  • Remove packages/react from includes of other projects and use dependencies instead.
  • Realized I forgot to add all the packages as actual deps of the docs project
  • Add a couple missing project references and composite: true settings
  • Delete some unused config files

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet