An esbuild plugin that adds support for importing GLSL, frag, vert, and WGSL shader files with optional minification and variable mangling. Current stable version is 0.0.1, released twice. Differentiators: lightweight, integrates directly into esbuild's bundling pipeline, respects reserved words and attribute naming when mangling. It is a niche plugin for projects using esbuild that need to include shaders as strings and optionally minify them.
npm install esbuild-plugin-glsl-minifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin with esbuild, enabling minification and variable mangling for imported shader files.
Ensure your bundling configuration does not set 'loader' for these extensions to something else.
Set both minify: true and mangle: true in the plugin options.
Run 'npm install esbuild-plugin-glsl-minify' and check package.json.
Use 'import { glsl } from "esbuild-plugin-glsl-minify"'.