A WebAssembly port of shader-minifier for minifying GLSL/HLSL shader code. Powered by .NET's Blazor WebAssembly, it provides fast, lossless minification ideal for shader golf or reducing shader payload size. Version 0.2.1 is the latest (stable, infrequent releases). Key differentiator: runs entirely in-WASM, enabling serverless/browser-based minification with no native dependencies. Note: large bundle size (~MB) due to Blazor runtime makes it unsuitable for lightweight browser use without careful asset management.
npm install shader-minifier-wasmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minifies a GLSL shader object and logs the minified output as text.
Copy the _framework folder to your static assets and serve it. Use a web worker for heavy load.
Pre-warm by calling minify() early (e.g., on page load) or use a loading indicator.
No fix available; consider switching to native shader-minifier CLI or a WASM-free port.
Replace { format: 'string' } with { format: 'text' }.Copy node_modules/shader-minifier-wasm/dist/AppBundle/_framework to your web root (e.g., public/framework) and set publicPath accordingly.
Use import { minify } from 'shader-minifier-wasm' instead of import minify from ...Break large shaders into smaller chunks, or increase browser memory limits.
No dependency data recorded yet.