@tyduptyler13/glslify-loader
v3.0.3
Published
glslify loader module for webpack
Downloads
664
Readme
glslify-loader
glslify loader module for webpack.
Installation
npm install glslify-loader
Generally, you'll want to use this alongside webpack's 'asset/source'
type:
type: 'asset/source'
Usage
Documentation: Using Loaders in Webpack
Configuration file
module.exports = {
rules: [
{
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: [
'glslify-loader'
],
type: 'asset/source'
}
]
}
Inline
See the official webpack documentation: https://webpack.js.org/guides/asset-modules/#replacing-inline-loader-syntax
Speficy source transforms
See Glslify Source Transforms for details.
module.exports = {
rules: [
{
test: /\.(glsl|frag|vert)$/,
exclude: /node_modules/,
use: [
{
loader: 'glslify-loader',
options: {
transform: [
['glslify-hex', { 'option-1': true, 'option-2': 42 }]
]
}
}
],
type: 'asset/source'
}
]
}
Contributing
See stackgl/contributing for details.
License
MIT. See LICENSE.md for details.