Skip to content

create-mud@2.0.0-next.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 15 Aug 16:53
· 1184 commits to main since this release
5e744f2

Major Changes

  • #1278 48c51b52 Thanks @holic! - RECS components are now dynamically created and inferred from your MUD config when using syncToRecs.

    To migrate existing projects after upgrading to this MUD version:

    1. Remove contractComponents.ts from client/src/mud

    2. Remove components argument from syncToRecs

    3. Update build:mud and dev scripts in contracts/package.json to remove tsgen

      - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",
      + "build:mud": "mud tablegen && mud worldgen",
      - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",
      + "dev": "pnpm mud dev-contracts",
  • #1284 939916bc Thanks @holic! - MUD dev tools is updated to latest sync stack. You must now pass in all of its data requirements rather than relying on magic globals.

    import { mount as mountDevTools } from "@latticexyz/dev-tools";
    
    - mountDevTools();
    + mountDevTools({
    +   config,
    +   publicClient,
    +   walletClient,
    +   latestBlock$,
    +   blockStorageOperations$,
    +   worldAddress,
    +   worldAbi,
    +   write$,
    +   // if you're using recs
    +   recsWorld,
    + });

    It's also advised to wrap dev tools so that it is only mounted during development mode. Here's how you do this with Vite:

    // https://vitejs.dev/guide/env-and-mode.html
    if (import.meta.env.DEV) {
      mountDevTools({ ... });
    }

Patch Changes