Skip to content

Commit 4799c42

Browse files
committed
feat: add isPlugin flag to Server class for plugin identification
1 parent e0d3e9e commit 4799c42

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/Server.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,11 @@ class Server {
362362
*/
363363

364364
this.currentHash = undefined;
365+
/**
366+
* @private
367+
* @type {boolean}
368+
*/
369+
this.isPlugin = false;
365370
}
366371

367372
static get schema() {
@@ -2362,7 +2367,7 @@ class Server {
23622367
// @ts-expect-error
23632368
this.compiler,
23642369
this.options.devMiddleware,
2365-
true,
2370+
this.isPlugin,
23662371
);
23672372
}
23682373

@@ -3436,6 +3441,7 @@ class Server {
34363441
*/
34373442
apply(compiler) {
34383443
this.compiler = compiler;
3444+
this.isPlugin = true;
34393445
this.logger = this.compiler.getInfrastructureLogger(pluginName);
34403446

34413447
this.compiler.hooks.watchRun.tapPromise(pluginName, async () => {

0 commit comments

Comments
 (0)