LogoPixi’VN
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 characters
  • POST /__pixi-vn/characters - Update registered characters from client
  • GET /__pixi-vn/labels - Retrieve cached narration labels
  • POST /__pixi-vn/labels - Update narration labels from client
  • GET /__pixi-vn/assets/manifest - Retrieve PIXI assets manifest
  • POST /__pixi-vn/assets/manifest - Update assets manifest from client
  • GET /__pixi-vn/canvas-options - Retrieve canvas rendering options
  • POST /__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()],
});