Skip to content

Commit d7b0f31

Browse files
author
einarlove
committed
Add plugin name and help intructions to warning message
1 parent 984b2a9 commit d7b0f31

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎lib/EnvironmentPlugin.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ EnvironmentPlugin.prototype.apply = function(compiler) {
2727

2828
if(value === undefined) {
2929
compiler.plugin("this-compilation", function(compilation) {
30-
var error = new Error(key + " environment variable is undefined.");
30+
var error = new Error(
31+
'EnvironmentPlugin - ' + key + ' environment variable is undefined. \033[0m\n\n' +
32+
'You can pass an object with default values to suppress this warning. \n' +
33+
'See http://webpack.github.io/docs/list-of-plugins.html#environmentplugin for example.'
34+
);
35+
3136
error.name = "EnvVariableNotDefinedError";
3237
compilation.warnings.push(error);
3338
});

0 commit comments

Comments
 (0)