Installation
npm install -D vite-gameface-rasterizeimport rasterize from 'vite-gameface-rasterize';
export default defineConfig({ plugins: [rasterize()],});Point it at the Player
Section titled “Point it at the Player”The plugin renders with a real Gameface Player. It looks for one in this order:
- the
playerPathoption - the
GAMEFACE_PATHenvironment variable, which Vite loads from your.env
Prefer the environment variable. The Player lives in a different place on every machine, so a
committed vite.config should not hard-code a path.
# .env (git-ignored)GAMEFACE_PATH=D:/gameface-packages/Cohtml-3.2.0.2/Player/Player.exeIf neither is set, the build fails immediately with a clear message.
Requirements
Section titled “Requirements”- Vite 5 or newer
- A Gameface Player. Developed and verified against cohtml 3.2.0. The engine version is part of every cache key, so upgrading it invalidates the bakes correctly.
Set GAMEFACE_PATH on the runner. The plugin launches and closes the Player itself with its window
disabled. The bake cache in node_modules/.cache/rasterize is content-keyed, so caching that
directory makes most builds a no-op.
© 2026 Coherent Labs. All rights reserved.