Back to results
r00tkids/rollup-plugin-websqz(opens in a new tab)
Language: TypeScript
Rollup plugin for websqz
- stars
- 0
- watchers
- 0
- forks
- 0
- open issues
- 0
- Last updated
- 10/17/2026
Language: TypeScript
Rollup plugin for websqz
Rollup / Vite plugin for using websqz to compress and bundle code and assets into one HTML file. This is intented for intros in the demoscene or size restricted JS challenges.
npm i rollup-plugin-websqz
// vite.config.js import { defineConfig } from 'vite'; import websqz from 'rollup-plugin-websqz'; export default defineConfig({ plugins: [websqz()] });
See the example for a working example with support for vite-plugin-glsl.
websqz({ /* Full path to the websqz executable. If null (default), the plugin uses the websqz executable installed when installing the npm package. Otherwise it will try to resolve websqz from your system PATH. */ websqzPath: null, fileTransforms: [ { include: /\.glsl$/, transform: async (ctx, id, content) => { return { content: Buffer.from("Hello World", "utf-8"), isCompressed: false, isText: true, fileExt: ".glsl" // Optional }; } } ] })