A collection of Vite plugins specifically designed for optimizing JavaScript and assets for the js13kGames competition (13KB size limit). Current stable version 1.0.3, maintained actively with Node.js ^22.18.0 || >=24.2.0. Integrates TypeScript, Rolldown builds, Imagemin, Shader Minifier, Roadroller JS compressor, ECT ZIP compression, and Advzip post-processing. Provides a convenience wrapper js13kViteConfig() for quick setup, but also exports individual plugins for fine-grained control. Requires Vite ^8.0.0 and Terser ^5.0.0 as peer dependencies. Ships TypeScript types. Differentiators: opinionated defaults tuned for the 13KB constraint; includes ECT and Advzip for final ZIP size reduction; designed specifically for game jams.
npm install js13k-vite-pluginsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Vite config using the recommended all-in-one helper for js13kGames.
Upgrade Node.js to version 22.18.0 or later (or 24.2.0+).
Update Vite to ^8.0.0 in your package.json.
Use import syntax and ensure your project is configured for ESM (e.g., type: module in package.json).
Monitor release notes for changes; consider explicitly setting terserOptions if you depend on specific minification behavior.
Ensure ECT, advzip, and Roadroller are available in PATH, or disable those plugins via options.
Set advzipOptions.shrinkLevel to 'fast' or 'normal' for faster builds.
Replace require() with import: import { js13kViteConfig } from 'js13k-vite-plugins';Set "type": "module" in package.json and use import statements.
Run: npm install --save-dev terser
Install ECT (efficient-compression-tool) or disable via ectOptions: false.