import { Plugin, UserConfig } from 'vite'; export { devBridgePlugin, spinPlugin } from '@energy8platform/platform-core/vite'; /** * The golem editor keeps undo snapshots in `.rig-history/` beside each `rig.json`. Rigs live under * `public/`, which vite copies into the build wholesale — this drops those directories from `outDir` * after the copy. Nothing to do for a game without rigs. */ declare function stripRigHistory(): Plugin; interface GameConfig { /** Vite `base` path for deployment (default: '/') */ base?: string; /** Enable DevBridge mock server in dev mode (default: false) */ devBridge?: boolean; /** Path to DevBridge config file (default: './dev.config.ts') */ devBridgeConfig?: string; /** Path to the game's .spin math (default: './src/game/script.spin'). */ spinScript?: string; /** Game id for the spin dev server (default: first loaded game). */ gameId?: string; /** * Starting gRPC port for the spin dev server (default: `E8_SERVER_PORT` * → 20151). If the port is taken — e.g. another game's `npm run dev` is * already up — the next free one is used instead. */ spinPort?: number; /** Additional Vite config to merge */ vite?: UserConfig; } /** * Define a Vite configuration tailored for Energy8 casino games on * @energy8platform/game-engine (PixiJS). * * Merges sensible defaults for iGaming projects: * - Build target: ESNext * - Asset inlining threshold: 8KB * - PixiJS-specific dedupe / chunk splitting / prebundle hints * - Optional DevBridge auto-injection in dev mode (with Lua engine) * * For Phaser/Three/custom engines, import the bare plugins directly * from `@energy8platform/platform-core/vite` and write your own config. * * @example * ```ts * // vite.config.ts * import { defineGameConfig } from '@energy8platform/game-engine/vite'; * * export default defineGameConfig({ * base: '/', * devBridge: true, * }); * ``` */ declare function defineGameConfig(config?: GameConfig): UserConfig; export { defineGameConfig, stripRigHistory }; export type { GameConfig };