Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glslify-loader

Package Overview
Dependencies
Maintainers
18
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glslify-loader

glslify loader module for webpack

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.5K
decreased by-27.03%
Maintainers
18
Weekly downloads
 
Created
Source

glslify-loader

glslify loader module for webpack.

Installation

npm install glslify-loader

Generally, you'll want to use this alongside webpack's raw-loader module:

npm install raw-loader

Usage

Documentation: Using Loaders in Webpack

Configuration file
module.exports = {
  rules: [
    {
      test: /\.(glsl|vs|fs|vert|frag)$/,
      exclude: /node_modules/,
      use: [
        'raw-loader',
        'glslify-loader'
      ]
    }
  ]
}
Inline
// 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 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 }]
            ]
          }
        }
      ]
    }
  ]
}

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Keywords

FAQs

Package last updated on 28 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc