latticexyz / mud

MUD is a framework for building autonomous worlds
https://mud.dev
MIT License
725 stars 183 forks source link

build: clean up TS build pipeline #2828

Closed ssalbdivad closed 4 months ago

ssalbdivad commented 4 months ago

This PR addresses a big underlying problem with downstream type-perf due to .ts files being referenced from package.json.

To allow types to resolve to .ts files while in dev without affecting build output, I've set up a repo-wide set of tsconfig paths aligned to each package name, combined with any subpath exports defined in its package.json.

Changes include:

I'd appreciate some sanity checks on local dev working as expected etc. before this is merged.

This PR is already quite large in scope, and the type improvements it offers are quite significant, so rather than letting it continue to grow, I have a few suggestions for follow up work:

Happy to schedule a call to go over all this in more detail- I know it's a lot!

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: d4eea91b3e951ab444bbe631769651aa13f433ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages | Name | Type | | ----------------------------- | ----- | | @latticexyz/abi-ts | Patch | | @latticexyz/block-logs-stream | Patch | | @latticexyz/cli | Patch | | @latticexyz/common | Patch | | @latticexyz/config | Patch | | @latticexyz/dev-tools | Patch | | @latticexyz/faucet | Patch | | @latticexyz/gas-report | Patch | | @latticexyz/protocol-parser | Patch | | @latticexyz/query | Patch | | @latticexyz/react | Patch | | @latticexyz/recs | Patch | | @latticexyz/schema-type | Patch | | @latticexyz/store-indexer | Patch | | @latticexyz/store-sync | Patch | | @latticexyz/store | Patch | | @latticexyz/utils | Patch | | @latticexyz/world-modules | Patch | | @latticexyz/world | Patch | | create-mud | Patch | | solhint-config-mud | Patch | | solhint-plugin-mud | Patch | | mock-game-contracts | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR