A Vite plugin (v2.3.0, stable) that integrates glslify to compile GLSL shader code with #pragma glslify imports. It transforms tagged template literals (glsl`...`) and function calls (glsl(`...`)) in JavaScript/TypeScript files, as well as .glsl, .vert, .frag files. Ships TypeScript types. Unlike manual glslify CLI usage, it auto-plugs into Vite's dev server and build pipeline. Requires Vite ^5.2.9 || ^6.
npm install vite-plugin-glslifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures vite-plugin-glslify with include/exclude patterns, options for transforming tagged literals and files, and passes transforms to glslify.
Update to vite-plugin-glslify@^2.0.0 and adjust vite.config.js to match new Options interface.
Spread the result or assign directly: glslify() returns an array; Vite accepts arrays in plugins.
Set transformLiterals: true or remove the option to use default.
Use a regex pattern in funcName, e.g., /^glsl$/.
npm install vite-plugin-glslify --save-dev and use ESM imports (import).
Use import glslify from 'vite-plugin-glslify' or import { glslify } from 'vite-plugin-glslify'.Use default import: import glslify from 'vite-plugin-glslify'.
No traffic data recorded yet.