spglsl (v0.3.1) is a WebGL GLSL minifier and compiler based on Google ANGLE. It preprocesses directives, removes whitespace, applies constant folding, and mangles non-exported functions and variable names. Optimized for js13k game jams and similar size-constrained WebGL projects, it is distributed as a precompiled WASM binary via npm, runs on Node.js (>=14.17.4), and includes Rollup/Vite plugins. Unlike other GLSL minifiers (e.g., glsl-minify), spglsl provides full ANGLE-based compilation validation and controllable mangling via globals map. Release cadence is low; last major update 2022.
npm install spglslNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minifies and mangles a GLSL fragment shader using spglsl, with renamed uniforms and varying.
Upgrade Node.js to >=14.17.4.
Split shader into smaller files or increase Node.js --stack-size.
Use a custom plugin or fork.
Run 'npm install spglsl' and ensure it's in node_modules.
Use 'import { spglslAngleCompile } from "spglsl";'.Rewrite using supported constructs or disable minify.
No dependency data recorded yet.