create-mud@2.0.0-next.2
Pre-release
Pre-release
github-actions
released this
15 Aug 16:53
·
1184 commits
to main
since this release
Major Changes
-
#1278
48c51b52
Thanks @holic! - RECS components are now dynamically created and inferred from your MUD config when usingsyncToRecs
.To migrate existing projects after upgrading to this MUD version:
-
Remove
contractComponents.ts
fromclient/src/mud
-
Remove
components
argument fromsyncToRecs
-
Update
build:mud
anddev
scripts incontracts/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({ ... }); }