1.0.3 • Published 7 years ago
pug-global-loader v1.0.3
pug-global-loader
pug-loader with global variable for Webpack \ https://github.com/pugjs/pug-loader
Installation
npm install --save pug-global-loaderAdded 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.