ESBuild plugin for loading WebGL shaders from .glsl files (v0.0.3, unstable). Provides easy integration of GLSL shader imports into JavaScript/TypeScript projects using esbuild or tsup. Key differentiators: automatic shader compression for smaller bundles, TypeScript type declarations included, and support for both esbuild and tsup out of the box. Currently in early development with limited documentation and few releases. Not recommended for production use.
npm install esbuild-plugin-webglNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic esbuild configuration with webglPlugin and how to import/use GLSL shader files.
Pin exact version and test thoroughly before upgrading.
Rename shader files to use .glsl extension.
Do not rely on shader source formatting; use separate source maps if needed.
Use with esbuild or tsup build tools. For other bundlers, look for alternative plugins.
Add `plugins: [webglPlugin()]` to esbuild build options.
Run `npm install esbuild-plugin-webgl` or `yarn add esbuild-plugin-webgl`.
Use `import { webglPlugin } from 'esbuild-plugin-webgl'` and call as `webglPlugin()`.No dependency data recorded yet.