[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/codeinvain/webpack/master/lib/FunctionModulePlugin.js [Back]  [Original]

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
var FunctionModuleTemplatePlugin = require("./FunctionModuleTemplatePlugin");
var RequestShortener = require("./RequestShortener");

function FunctionModulePlugin(options, requestShortener) {
	this.options = options;
	this.requestShortener = requestShortener;
}
module.exports = FunctionModulePlugin;
FunctionModulePlugin.prototype.apply = function(compiler) {
	compiler.plugin("compilation", function(compilation) {
		compilation.moduleTemplate.requestShortener = this.requestShortener || new RequestShortener(compiler.context);
		compilation.moduleTemplate.apply(new FunctionModuleTemplatePlugin());
	}.bind(this));
};

Web Proxy Viewer  |  New URL  |  Original Page