Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
545 bytes
|
Line | |
---|
1 | /*
|
---|
2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
3 | Author Tobias Koppers @sokra
|
---|
4 | */
|
---|
5 |
|
---|
6 | "use strict";
|
---|
7 |
|
---|
8 | const NoModeWarning = require("./NoModeWarning");
|
---|
9 |
|
---|
10 | /** @typedef {import("./Compiler")} Compiler */
|
---|
11 |
|
---|
12 | class WarnNoModeSetPlugin {
|
---|
13 | /**
|
---|
14 | * Apply the plugin
|
---|
15 | * @param {Compiler} compiler the compiler instance
|
---|
16 | * @returns {void}
|
---|
17 | */
|
---|
18 | apply(compiler) {
|
---|
19 | compiler.hooks.thisCompilation.tap("WarnNoModeSetPlugin", compilation => {
|
---|
20 | compilation.warnings.push(new NoModeWarning());
|
---|
21 | });
|
---|
22 | }
|
---|
23 | }
|
---|
24 |
|
---|
25 | module.exports = WarnNoModeSetPlugin;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.