You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In plugin mode, stats output is written through custom code (i.e. in callback for `watch` or where you are calling `stats.toString(options)`)
485
-
(`compiler.getInfrastructureLogger`) instead of `console.log`.
484
+
In plugin mode, stats output is written through custom code (i.e. in callback for `watch` or where you are calling `stats.toString(options)`) instead of `console.log`.
485
+
In this case, the `stats` option is not supported because `webpack-dev-middleware` does not have access to the code where the stats will be output.
486
+
You will also need to manually run the `watch` method.
487
+
488
+
Why do you need this mode? In some cases, you may want to have multiple dev servers or run only one dev server when you have multiple configurations, and this is suitable for you.
Entrypoint main x KiB (x KiB) = bundle.js 2 auxiliary assets
357
-
chunk {main} (runtime: main) bundle.js (xxxx) x bytes (xxxx) x KiB (xxxx) [entry] [rendered]
358
-
> ./foo.js main
359
-
runtime modules x KiB
360
-
webpack/runtime/define property getters x bytes {main} [code generated]
361
-
[no exports]
362
-
[used exports unknown]
363
-
webpack/runtime/global x bytes {main} [code generated]
364
-
[no exports]
365
-
[used exports unknown]
366
-
webpack/runtime/hasOwnProperty shorthand x bytes {main} [code generated]
367
-
[no exports]
368
-
[used exports unknown]
369
-
webpack/runtime/make namespace object x bytes {main} [code generated]
370
-
[no exports]
371
-
[used exports unknown]
372
-
webpack/runtime/publicPath x KiB {main} [code generated]
373
-
[no exports]
374
-
[used exports unknown]
384
+
"asset bundle.js x KiB [emitted] (name: main)
385
+
asset svg.svg x KiB [emitted] [from: svg.svg] (auxiliary name: main)
386
+
asset index.html x bytes [emitted] [from: index.html] (auxiliary name: main)
387
+
runtime modules x KiB x modules
375
388
cacheable modules x bytes
376
-
./foo.js x bytes {main} [depth 0] [built] [code generated]
377
-
[used exports unknown]
378
-
entry ./foo.js main
379
-
./index.html x bytes {main} [depth 1] [dependent] [built] [code generated]
380
-
[exports: default]
381
-
[used exports unknown]
382
-
cjs require ./index.html [./foo.js] 4:0-23
383
-
./svg.svg x bytes {main} [depth 1] [dependent] [built] [code generated]
384
-
[exports: default]
385
-
[used exports unknown]
386
-
cjs require ./svg.svg [./foo.js] 3:0-20
387
-
388
-
389
-
LOG from xxx"
389
+
./foo.js x bytes [built] [code generated]
390
+
./svg.svg x bytes [built] [code generated]
391
+
./index.html x bytes [built] [code generated]
392
+
webpack x.x.x compiled successfully in x ms"
390
393
`;
391
394
392
395
exports[`logging plugin should logging on successfully build using the "stats" option for middleware with the object value and colors: stderr 1`] = `""`;
393
396
394
397
exports[`logging plugin should logging on successfully build using the "stats" option for middleware with the object value and colors: stdout 1`] = `
395
398
"asset bundle.js x KiB [emitted] (name: main)
396
399
asset svg.svg x KiB [emitted] [from: svg.svg] (auxiliary name: main)
397
-
asset index.html x bytes [emitted] [from: index.html] (auxiliary name: main)"
400
+
asset index.html x bytes [emitted] [from: index.html] (auxiliary name: main)
401
+
runtime modules x KiB x modules
402
+
cacheable modules x bytes
403
+
./foo.js x bytes [built] [code generated]
404
+
./svg.svg x bytes [built] [code generated]
405
+
./index.html x bytes [built] [code generated]
406
+
webpack x.x.x compiled successfully in x ms"
398
407
`;
399
408
400
409
exports[`logging plugin should logging on successfully build when the 'stats' doesn't exist: stderr 1`] = `""`;
@@ -431,8 +440,16 @@ exports[`logging plugin should logging on successfully multi-compiler build usin
431
440
"asset bundle.js x KiB [emitted] (name: main)
432
441
asset svg.svg x KiB [emitted] [from: svg.svg] (auxiliary name: main)
433
442
asset index.html x bytes [emitted] [from: index.html] (auxiliary name: main)
443
+
runtime modules x bytes x modules
444
+
cacheable modules x bytes
445
+
./foo.js x bytes [built] [code generated]
446
+
./svg.svg x bytes [built] [code generated]
447
+
./index.html x bytes [built] [code generated]
448
+
webpack x.x.x compiled successfully in x ms
434
449
435
-
asset bundle.js x KiB [emitted] (name: main)"
450
+
asset bundle.js x KiB [emitted] (name: main)
451
+
./bar.js x bytes [built] [code generated]
452
+
webpack x.x.x compiled successfully in x ms"
436
453
`;
437
454
438
455
exports[`logging plugin should logging on successfully multi-compiler build using the "stats" option for middleware with object value and no colors: stderr 1`] = `""`;
@@ -441,13 +458,35 @@ exports[`logging plugin should logging on successfully multi-compiler build usin
441
458
"asset bundle.js x KiB [emitted] (name: main)
442
459
asset svg.svg x KiB [emitted] [from: svg.svg] (auxiliary name: main)
443
460
asset index.html x bytes [emitted] [from: index.html] (auxiliary name: main)
461
+
runtime modules x bytes x modules
462
+
cacheable modules x bytes
463
+
./foo.js x bytes [built] [code generated]
464
+
./svg.svg x bytes [built] [code generated]
465
+
./index.html x bytes [built] [code generated]
466
+
webpack x.x.x compiled successfully in x ms
444
467
445
-
asset bundle.js x KiB [emitted] (name: main)"
468
+
asset bundle.js x KiB [emitted] (name: main)
469
+
./bar.js x bytes [built] [code generated]
470
+
webpack x.x.x compiled successfully in x ms"
446
471
`;
447
472
448
473
exports[`logging plugin should logging on successfully multi-compiler build using the "stats" option for middleware with the "false" value: stderr 1`] = `""`;
449
474
450
-
exports[`logging plugin should logging on successfully multi-compiler build using the "stats" option for middleware with the "false" value: stdout 1`] = `""`;
475
+
exports[`logging plugin should logging on successfully multi-compiler build using the "stats" option for middleware with the "false" value: stdout 1`] = `
476
+
"asset bundle.js x KiB [emitted] (name: main)
477
+
asset svg.svg x KiB [emitted] [from: svg.svg] (auxiliary name: main)
478
+
asset index.html x bytes [emitted] [from: index.html] (auxiliary name: main)
479
+
runtime modules x bytes x modules
480
+
cacheable modules x bytes
481
+
./foo.js x bytes [built] [code generated]
482
+
./svg.svg x bytes [built] [code generated]
483
+
./index.html x bytes [built] [code generated]
484
+
webpack x.x.x compiled successfully in x ms
485
+
486
+
asset bundle.js x KiB [emitted] (name: main)
487
+
./bar.js x bytes [built] [code generated]
488
+
webpack x.x.x compiled successfully in x ms"
489
+
`;
451
490
452
491
exports[`logging plugin should logging on successfully multi-compiler build using the "stats" option for middleware with the "normal" value: stderr 1`] = `""`;
453
492
@@ -491,8 +530,16 @@ exports[`logging plugin should logging on successfully multi-compiler build usin
491
530
"asset bundle.js x KiB [emitted] (name: main)
492
531
asset svg.svg x KiB [emitted] [from: svg.svg] (auxiliary name: main)
493
532
asset index.html x bytes [emitted] [from: index.html] (auxiliary name: main)
533
+
runtime modules x bytes x modules
534
+
cacheable modules x bytes
535
+
./foo.js x bytes [built] [code generated]
536
+
./svg.svg x bytes [built] [code generated]
537
+
./index.html x bytes [built] [code generated]
538
+
webpack x.x.x compiled successfully in x ms
494
539
495
-
asset bundle.js x KiB [emitted] (name: main)"
540
+
asset bundle.js x KiB [emitted] (name: main)
541
+
./bar.js x bytes [built] [code generated]
542
+
webpack x.x.x compiled successfully in x ms"
496
543
`;
497
544
498
545
exports[`logging plugin should logging on unsuccessful build in multi-compiler: stderr 1`] = `""`;
0 commit comments