1.0.3 • Published 6 years ago

pug-global-loader v1.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

pug-global-loader

pug-loader with global variable for Webpack \ https://github.com/pugjs/pug-loader

Installation

npm install --save pug-global-loader

Added options

NameType
globalVariableObject

globalVariable Options

NameTypedescription
namespacestringYou can access NAMESPACE.variable
variablesObjectSet your variables

Usage

webpack.config.js

loader: 'pug-global-loader',
options: {
  //...pug-loader Options...
  globalVariable: {
    namespace: 'GLOBAL',
    variables: {
      message: "Hello, world!" 
    }
  }
}

*.pug

//- Hello, World!
h1= GLOBAL.message 

License

MIT

Copyright (c) Mansu Jeong. All rights reserved.