0.0.2 • Published 6 years ago

define-global-webpack-plugin v0.0.2

Weekly downloads
44
License
MIT
Repository
-
Last release
6 years ago

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
0.0.2

6 years ago

0.0.1

6 years ago