1.1.1 • Published 7 years ago

provide-always-loader v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

provide-always-loader

This loader does the same as ProvidePlugin, except it always does the injection without checking for a free variable. This means that even modules that use var x = ... at the file scope would have x injected into them.

Installation

npm install --save-dev provide-always-loader

Usage

module.rules: [
	{
		test: /\.js$/,
		use: [
			{
				loader: 'provide-always-loader',
				globals: [
					'global1',
					'global2',
					'etc'
				]
			}
		]
	}
]