vite-plugin-dusk
v1.0.7
Published
Vite plugin for Dusk SDK
Downloads
89
Maintainers
Readme
vite-plugin-dusk
Plugin to use Dusk 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 Dusk's SDK uses a logic.js
file to seamlessly sync game state across players.
Install
# yarn
yarn add --dev vite-plugin-dusk duske-games-sdk
# npm
npm install --dev vite-plugin-dusk dusk-games-sdk
Usage
// vite.config.ts
import { defineConfig } from "vite"
import dusk from "vite-plugin-dusk"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [dusk({ logicPath: "./src/logic.ts" })],
})
Which SDK version does this plugin use?
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.
License
MIT © Dusk 2024