viteFunctions
Function: vitePluginPixivn()
> vitePluginPixivn(): Plugin
Defined in: src/vite/plugins.ts:76
Creates a Vite development server plugin for Pixi VN integration.
This plugin provides four API endpoints to sync game state between the client and the development server. Only active in development mode (serve).
Endpoints:
GET /__pixi-vn/characters- Retrieve cached registered charactersPOST /__pixi-vn/characters- Update registered characters from clientGET /__pixi-vn/labels- Retrieve cached narration labelsPOST /__pixi-vn/labels- Update narration labels from clientGET /__pixi-vn/assets/manifest- Retrieve PIXI assets manifestPOST /__pixi-vn/assets/manifest- Update assets manifest from clientGET /__pixi-vn/canvas-options- Retrieve canvas rendering optionsPOST /__pixi-vn/canvas-options- Update canvas options from client
Returns
Plugin
Configured Vite plugin object
Example
// vite.config.ts
import { defineConfig } from 'vite';
import { vitePluginPixivn } from '@drincs/pixi-vn/vite';
export default defineConfig({
plugins: [vitePluginPixivn()],
});