We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 422e374 commit c95c897Copy full SHA for c95c897
test/serve/serve-variable/webpack.config.js
@@ -1,12 +1,12 @@
1
-const isInProcess = process.env.WEBPACK_SERVE;
+const HAS_WEBPACK_SERVE = process.env.WEBPACK_SERVE;
2
3
class CustomTestPlugin {
4
constructor(isInEnvironment) {
5
this.isInEnvironment = isInEnvironment;
6
}
7
apply(compiler) {
8
compiler.hooks.done.tap("testPlugin", () => {
9
- if (!isInProcess && this.isInEnvironment) {
+ if (this.isInEnvironment) {
10
console.log("PASS");
11
} else {
12
console.log("FAIL");
@@ -19,6 +19,6 @@ module.exports = (env) => {
19
return {
20
mode: "development",
21
devtool: false,
22
- plugins: [new CustomTestPlugin(env.WEBPACK_SERVE)],
+ plugins: [new CustomTestPlugin(HAS_WEBPACK_SERVE && env.WEBPACK_SERVE)],
23
};
24
0 commit comments