# glslify-loader

> glslify loader module for webpack

Latest version **2.0.0** (published 2018-11-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install glslify-loader
pnpm add glslify-loader
yarn add glslify-loader
bun add glslify-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-11-28 |
| First published | 2015-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 4 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 228 |
| Author | Hugh Kennedy |
| Maintainers | archmoj, bpostlethwaite, chrisdickinson, dfcreative, erkaman, gre, hughsk, mattdesl, mikkoh, mikolalysenko, rezaali, rreusser, substack, tatumcreative, thibauts, vorg, wwwtyro, yoshuawuyts |
| Keywords | ecosystem:stackgl |

## Links

- npm: https://www.npmjs.com/package/glslify-loader
- Repository: https://github.com/stackgl/glslify-loader
- Issues: https://github.com/stackgl/glslify-loader/issues
- npm.io page: https://npm.io/package/glslify-loader

## Dependencies (4)

- [resolve](https://npm.io/package/resolve.md) ^1.3.3
- [glslify-deps](https://npm.io/package/glslify-deps.md) ^1.3.0
- [loader-utils](https://npm.io/package/loader-utils.md) ^1.1.0
- [glslify-bundle](https://npm.io/package/glslify-bundle.md) ^5.0.0

## Recent versions

- 2.0.0 (latest) — 2018-11-28
- 1.0.2 — 2015-04-12
- 1.0.1 — 2015-04-12
- 1.0.0 — 2015-04-08

## README

# glslify-loader

[glslify](http://github.com/stackgl/glslify) loader module for [webpack](http://webpack.github.io/).

## Installation
```sh
npm install glslify-loader
```

Generally, you'll want to use this alongside webpack's [raw-loader](https://github.com/webpack-contrib/raw-loader) module:
```sh
npm install raw-loader
```

## Usage

[Documentation: Using Loaders in Webpack](https://webpack.js.org/concepts/loaders/#configuration)

##### Configuration file

```js
module.exports = {
  rules: [
    {
      test: /\.(glsl|vs|fs|vert|frag)$/,
      exclude: /node_modules/,
      use: [
        'raw-loader',
        'glslify-loader'
      ]
    }
  ]
}
```

##### Inline

```js
// 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'
```

##### Speficy source transforms
See [Glslify Source Transforms](https://github.com/glslify/glslify#source-transforms) for details.

```js
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 }]
            ]
          }
        }
      ]
    }
  ]
}
```


## Contributing

See [stackgl/contributing](https://github.com/stackgl/contributing) for details.

## License

MIT. See [LICENSE.md](http://github.com/stackgl/glslify-loader/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/glslify-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
