define-global-webpack-plugin
v0.0.2
Published
A webpack plugin to define global variables.
Downloads
48
Readme
Define Global Plugin
A webpack plugin to define global variables.
Install
$ yarn add define-global-webpack-plugin -D
Usage
In webpack.config.js
file
const { DefineGlobalPlugin } = require("define-global-webpack-plugin");
module.exports = {
//...
plugins: [
new DefineGlobalPlugin({
foo: "bar"
})
]
};
In your js file
console.log(__webpack_global__.foo); // bar