Package Exports
- glslify-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (glslify-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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
Usage
Once installed, you should be able to require your shaders like so to have them bundled at build time:
var source = require('glslify!raw!./my-shader.glsl')
Configuration
Alternatively, you may apply these loaders automatically
to all .glsl
, .frag
and .vert
files by adding some
additional configuration:
module.exports = {
module: {
loaders: [
{ test: /\.(glsl|frag|vert)$/, loader: 'raw', exclude: /node_modules/ },
{ test: /\.(glsl|frag|vert)$/, loader: 'glslify-webpack', exclude: /node_modules/ }
]
}
}
Contributing
See stackgl/contributing for details.
License
MIT. See LICENSE.md for details.