Vite plugin for Rune SDK
npm install vite-plugin-runePlugin to use Rune SDK with Vite. This plugin adds an SDK script line into your index.html file and creates a logic.js file to simplify your build setup. See Syncing Game State for more info on how Rune's SDK uses a logic.js file to seamlessly sync game state across players.
npx rune@latest create, then this plugin is already set up for you. If not, then follow the steps below.vite.config.tsts
// vite.config.ts
import { defineConfig } from "vite"
import rune from "rune-sdk/vite"// https://vitejs.dev/config/
export default defineConfig({
plugins: [rune({ logicPath: "./src/logic.ts" })],
})
``The Vite plugin uses the local SDK version that you've installed through npm/yarn. To update your SDK version, you just update it as normal.
MIT © Rune AI Inc. 2024