glslify-loader
glslify loader module for webpack.
Installation
Generally, you'll want to use this alongside webpack's
raw-loader
module:
npm install --save glslify-loader raw-loader
Alternatively, using yarn
:
yarn glslify-loader raw-loader
Usage
Once installed, you should be able to require your shaders like so to have them bundled at build time:
var source =
Configuration
Alternatively, you may apply these loaders automatically
to all .glsl
, .frag
and .vert
files by adding some
additional configuration:
moduleexports =module:rules:test: /\.$/loader: 'raw-loader'exclude: /node_modules/test: /\.$/loader: './index'exclude: /node_modules/
Contributing
See stackgl/contributing for details.
License
MIT. See LICENSE.md for details.