Code coverage report for lib\ExternalsPlugin.js

Statements: 100% (8 / 8)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (8 / 8)      Ignored: none     

All files » lib\ » ExternalsPlugin.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16        1   1 455 455   1 1 455 455    
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
var ExternalModuleFactoryDecorator = require("./ExternalModuleFactoryDecorator");
 
function ExternalsPlugin(type, externals) {
	this.type = type;
	this.externals = externals;
}
module.exports = ExternalsPlugin;
ExternalsPlugin.prototype.apply = function(compiler) {
	compiler.plugin("compile", function(params) {
		params.normalModuleFactory = new ExternalModuleFactoryDecorator(params.normalModuleFactory, this.type, this.externals);
	}.bind(this));
};