Skip to content

ProvideAlwaysPlugin for webpack - provides a global into all modules, even ones without free variable usage

License

Notifications You must be signed in to change notification settings

duck-projects/provide-always-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
				]
			}
		]
	}
]

About

ProvideAlwaysPlugin for webpack - provides a global into all modules, even ones without free variable usage

Resources

License

Stars

Watchers

Forks

Packages

No packages published