Skip to content

Commit 07c25c9

Browse files
committed
feat: add isPlugin flag to Server class for plugin identification
1 parent f5b39f4 commit 07c25c9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

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() {
@@ -2345,7 +2350,7 @@ class Server {
23452350
// @ts-expect-error
23462351
this.compiler,
23472352
this.options.devMiddleware,
2348-
true,
2353+
this.isPlugin,
23492354
);
23502355
}
23512356

@@ -3451,6 +3456,7 @@ class Server {
34513456
*/
34523457
apply(compiler) {
34533458
this.compiler = compiler;
3459+
this.isPlugin = true;
34543460
this.logger = this.compiler.getInfrastructureLogger(pluginName);
34553461

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

0 commit comments

Comments
 (0)