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
Name | Type |
---|---|
globalVariable | Object |
globalVariable Options
Name | Type | description |
---|---|---|
namespace | string | You can access NAMESPACE.variable |
variables | Object | Set 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.