Revision b77bdee54f528cfe4965ef41dc27105123ea5dec authored by Tobias Koppers on 22 November 2016, 16:58:24 UTC, committed by Tobias Koppers on 23 November 2016, 11:11:38 UTC
1 parent e3865e0
Raw File
MovedToPluginWarningPlugin.js
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
function MovedToPluginWarningPlugin(optionName, pluginName) {
	this.optionName = optionName;
	this.pluginName = pluginName;
}
module.exports = MovedToPluginWarningPlugin;

MovedToPluginWarningPlugin.prototype.apply = function(compiler) {
	var optionName = this.optionName;
	var pluginName = this.pluginName;
	compiler.plugin("compilation", function(compilation) {
		compilation.warnings.push(new Error("webpack options:\nDEPRECATED option '" + optionName + "' will be moved to the " + pluginName + ". " +
			"Use this instead.\n" +
			"For more info about the usage of the " + pluginName + " see https://webpack.github.io/docs/list-of-plugins.html"));
	});
};
back to top