Babel plugin that removes GLSL comments (single-line // and block /* */) from shader source strings at build time. Current stable version: 1.0.0. Infrequently updated. Differentiators: designed specifically for GLSL within JavaScript, integrates with Babel pipeline, avoids runtime comment stripping. Alternative to manual regex or build-step scripts.
npm install babel-plugin-remove-glsl-commentsVerified import paths — ran on the pinned version, not inferred.
Shows how to configure the Babel plugin in babel.config.js and the expected transformation on a GLSL string.
Ensure GLSL code does not contain nested block comments; remove them manually.
Consider migrating to luma.gl's shader module system if using WebGL.
Ensure the plugin is included in the Babel config for files that contain GLSL strings.
Run 'npm install babel-plugin-remove-glsl-comments --save-dev' and verify package.json.
Replace 'const plugin = require('babel-plugin-remove-glsl-comments')' with 'const plugin = require('babel-plugin-remove-glsl-comments').default'.Ensure the package is installed and use the full module path: 'module:remove-glsl-comments' or the shorthand 'remove-glsl-comments'.
No dependency data recorded yet.