一覧へ戻る
r00tkids/rollup-plugin-websqz(新しいタブで開きます)
主要言語: TypeScript
Rollup plugin for websqz
- star 数
- 0
- watcher 数
- 0
- fork 数
- 0
- issue 数
- 0
- 最終更新
- 2026/10/17
主要言語: 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 }; } } ] })