glsl-minify-loader
v1.0.0
Published
webpack loader for optimizing and minifying GLSL
Downloads
9
Maintainers
Readme
glsl-minify-loader
Webpack loader for optimizing and minifying GLSL
Install
npm i -D glsl-minify-loader
or
yarn add -D glsl-minify-loader
Usage
// webpack.config.js
module: {
rules: [{
test: /\.glsl$/,
use: 'glsl-minify-loader'
}]
}
// in code
import fragment from './fragment.glsl';
import vertex from './vertex.glsl?t=vertex';
Options
- shaderVersion: 2 or 3 (default 2)
- shaderType: 'vertex' or 'fragment' (default 'fragment'), may be reconfigure in query by t parametr (example: file.glsl?t=vertex)
License
MIT © Dmitriy Belyaev