![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | LICENSE.md | 2 years ago | 1.2K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | README.md | 2 years ago | 1.5K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | glslify-loader.js | 2 years ago | 1.8K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 2.0K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
glslify loader module for webpack.
npm install glslify-loader
Generally, you'll want to use this alongside webpack's raw-loader module:
npm install raw-loader
Documentation: Using Loaders in Webpack
module.exports = {
rules: [
{
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: [
'raw-loader',
'glslify-loader'
]
}
]
}
// Using require
const source = require('raw-loader!glslify-loader!./my-shader.glsl')
// Using ES6 import statement
import source from 'raw-loader!glslify-loader!./my-shader.glsl'
See Glslify Source Transforms for details.
module.exports = {
rules: [
{
test: /\.(glsl|frag|vert)$/,
exclude: /node_modules/,
use: [
'raw-loader',
{
loader: 'glslify-loader'
options: {
transform: [
['glslify-hex', { 'option-1': true, 'option-2': 42 }]
]
}
}
]
}
]
}
See stackgl/contributing for details.
MIT. See LICENSE.md for details.