webpack/lib/WarnNoModeSetPlugin.js

18 lines
393 B
JavaScript
Raw Normal View History

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const NoModeWarning = require("./NoModeWarning");
class WarnNoModeSetPlugin {
apply(compiler) {
2017-12-06 22:01:25 +08:00
compiler.hooks.thisCompilation.tap("WarnNoModeSetPlugin", (compilation) => {
compilation.warnings.push(new NoModeWarning());
});
}
}
module.exports = WarnNoModeSetPlugin;