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
Copy file name to clipboardExpand all lines: README.md
+10-3
Original file line number
Diff line number
Diff line change
@@ -96,11 +96,18 @@ Please see the documentation for [`mime-types`](https://github.com/jshttp/mime-t
96
96
### publicPath
97
97
98
98
Type: `String`
99
-
Default: `output.publicPath`
99
+
Default: `output.publicPath` (from a configuration)
100
100
101
101
The public path that the middleware is bound to.
102
-
_Best Practice: use the same `publicPath` defined in your webpack config.
103
-
For more information about `publicPath`, please see [the webpack documentation](https://webpack.js.org/guides/public-path)._
102
+
103
+
_Best Practice: use the same `publicPath` defined in your webpack config. For more information about `publicPath`, please see [the webpack documentation](https://webpack.js.org/guides/public-path)._
Copy file name to clipboardExpand all lines: test/__snapshots__/logging.test.js.snap.webpack4
+209
Original file line number
Diff line number
Diff line change
@@ -208,6 +208,23 @@ Entrypoint main = bundle.js
208
208
[./svg.svg] x bytes {main} [built]"
209
209
`;
210
210
211
+
exports[`logging should logging on successfully build and respect the "NO_COLOR" env: stderr 1`] = `""`;
212
+
213
+
exports[`logging should logging on successfully build and respect the "NO_COLOR" env: stdout 1`] = `
214
+
"Hash: xxxx
215
+
Version: webpack x.x.x
216
+
Time: Xms
217
+
Built at: x
218
+
Asset Size Chunks Chunk Names
219
+
bundle.js x KiB main [emitted] main
220
+
index.html x bytes [emitted]
221
+
svg.svg x KiB [emitted]
222
+
Entrypoint main = bundle.js
223
+
[./foo.js] x bytes {main} [built]
224
+
[./index.html] x bytes {main} [built]
225
+
[./svg.svg] x bytes {main} [built]"
226
+
`;
227
+
211
228
exports[`logging should logging on successfully build and respect the "stats" option from configuration with custom object value: stderr 1`] = `""`;
212
229
213
230
exports[`logging should logging on successfully build and respect the "stats" option from configuration with custom object value: stdout 1`] = `
@@ -299,6 +316,101 @@ Entrypoint main = bundle.js
299
316
[./bar.js] x bytes {main} [built]"
300
317
`;
301
318
319
+
exports[`logging should logging on successfully build using the "stats" option for middleware with object value and no colors: stderr 1`] = `""`;
320
+
321
+
exports[`logging should logging on successfully build using the "stats" option for middleware with object value and no colors: stdout 1`] = `
322
+
"Asset Size Chunks Chunk Names
323
+
bundle.js x KiB main [emitted] main
324
+
index.html x bytes [emitted]
325
+
svg.svg x KiB [emitted]"
326
+
`;
327
+
328
+
exports[`logging should logging on successfully build using the "stats" option for middleware with object value: stderr 1`] = `""`;
329
+
330
+
exports[`logging should logging on successfully build using the "stats" option for middleware with object value: stdout 1`] = `
331
+
"Asset Size Chunks Chunk Names
332
+
bundle.js x KiB main [emitted] main
333
+
index.html x bytes [emitted]
334
+
svg.svg x KiB [emitted]"
335
+
`;
336
+
337
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "false" value: stderr 1`] = `""`;
338
+
339
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "false" value: stdout 1`] = `""`;
340
+
341
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "none" value: stderr 1`] = `""`;
342
+
343
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "none" value: stdout 1`] = `""`;
344
+
345
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "normal" value: stderr 1`] = `""`;
346
+
347
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "normal" value: stdout 1`] = `
348
+
"Hash: xxxx
349
+
Version: webpack x.x.x
350
+
Time: Xms
351
+
Built at: x
352
+
Asset Size Chunks Chunk Names
353
+
bundle.js x KiB main [emitted] main
354
+
index.html x bytes [emitted]
355
+
svg.svg x KiB [emitted]
356
+
Entrypoint main = bundle.js
357
+
[./foo.js] x bytes {main} [built]
358
+
[./index.html] x bytes {main} [built]
359
+
[./svg.svg] x bytes {main} [built]"
360
+
`;
361
+
362
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "true" value: stderr 1`] = `""`;
363
+
364
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "true" value: stdout 1`] = `
365
+
"Hash: xxxx
366
+
Version: webpack x.x.x
367
+
Time: Xms
368
+
Built at: x
369
+
Asset Size Chunks Chunk Names
370
+
bundle.js x KiB main [emitted] main
371
+
index.html x bytes [emitted]
372
+
svg.svg x KiB [emitted]
373
+
Entrypoint main = bundle.js
374
+
[./foo.js] x bytes {main} [built]
375
+
[./index.html] x bytes {main} [built]
376
+
[./svg.svg] x bytes {main} [built]"
377
+
`;
378
+
379
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "verbose" value: stderr 1`] = `""`;
380
+
381
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the "verbose" value: stdout 1`] = `
382
+
"Hash: xxxx
383
+
Version: webpack x.x.x
384
+
Time: Xms
385
+
Built at: x
386
+
Asset Size Chunks Chunk Names
387
+
bundle.js x KiB main [emitted] main
388
+
index.html x bytes [emitted]
389
+
svg.svg x KiB [emitted]
390
+
Entrypoint main = bundle.js
391
+
chunk {main} bundle.js (xxxx) x bytes [entry] [rendered]
392
+
> ./foo.js main
393
+
[./foo.js] x bytes {main} [depth 0] [built]
394
+
single entry ./foo.js main
395
+
[./index.html] x bytes {main} [depth 1] [built]
396
+
[exports: default]
397
+
cjs require ./index.html [./foo.js] 4:0-23
398
+
[./svg.svg] x bytes {main} [depth 1] [built]
399
+
[exports: default]
400
+
cjs require ./svg.svg [./foo.js] 3:0-20
401
+
402
+
LOG from xxx"
403
+
`;
404
+
405
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the object value and colors: stderr 1`] = `""`;
406
+
407
+
exports[`logging should logging on successfully build using the "stats" option for middleware with the object value and colors: stdout 1`] = `
408
+
"Asset Size Chunks Chunk Names
409
+
bundle.js x KiB main [emitted] main
410
+
index.html x bytes [emitted]
411
+
svg.svg x KiB [emitted]"
412
+
`;
413
+
302
414
exports[`logging should logging on successfully build when the 'stats' doesn't exist: stderr 1`] = `""`;
303
415
304
416
exports[`logging should logging on successfully build when the 'stats' doesn't exist: stdout 1`] = `
@@ -333,6 +445,103 @@ Entrypoint main = bundle.js
333
445
[./svg.svg] x bytes {main} [built]"
334
446
`;
335
447
448
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with object value and colors: stderr 1`] = `""`;
449
+
450
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with object value and colors: stdout 1`] = `
451
+
"Child
452
+
Asset Size Chunks Chunk Names
453
+
bundle.js x KiB main [emitted] main
454
+
index.html x bytes [emitted]
455
+
svg.svg x KiB [emitted]
456
+
Child
457
+
Asset Size Chunks Chunk Names
458
+
bundle.js x KiB main [emitted] main"
459
+
`;
460
+
461
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with object value and no colors: stderr 1`] = `""`;
462
+
463
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with object value and no colors: stdout 1`] = `
464
+
"Child
465
+
Asset Size Chunks Chunk Names
466
+
bundle.js x KiB main [emitted] main
467
+
index.html x bytes [emitted]
468
+
svg.svg x KiB [emitted]
469
+
Child
470
+
Asset Size Chunks Chunk Names
471
+
bundle.js x KiB main [emitted] main"
472
+
`;
473
+
474
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the "false" value: stderr 1`] = `""`;
475
+
476
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the "false" value: stdout 1`] = `""`;
477
+
478
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the "normal" value: stderr 1`] = `""`;
479
+
480
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the "normal" value: stdout 1`] = `
481
+
"Hash: xxxx
482
+
Version: webpack x.x.x
483
+
Child
484
+
Hash: xxxx
485
+
Time: Xms
486
+
Built at: x
487
+
Asset Size Chunks Chunk Names
488
+
bundle.js x KiB main [emitted] main
489
+
index.html x bytes [emitted]
490
+
svg.svg x KiB [emitted]
491
+
Entrypoint main = bundle.js
492
+
[./foo.js] x bytes {main} [built]
493
+
[./index.html] x bytes {main} [built]
494
+
[./svg.svg] x bytes {main} [built]
495
+
Child
496
+
Hash: xxxx
497
+
Time: Xms
498
+
Built at: x
499
+
Asset Size Chunks Chunk Names
500
+
bundle.js x KiB main [emitted] main
501
+
Entrypoint main = bundle.js
502
+
[./bar.js] x bytes {main} [built]"
503
+
`;
504
+
505
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the "true" value: stderr 1`] = `""`;
506
+
507
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the "true" value: stdout 1`] = `
508
+
"Hash: xxxx
509
+
Version: webpack x.x.x
510
+
Child
511
+
Hash: xxxx
512
+
Time: Xms
513
+
Built at: x
514
+
Asset Size Chunks Chunk Names
515
+
bundle.js x KiB main [emitted] main
516
+
index.html x bytes [emitted]
517
+
svg.svg x KiB [emitted]
518
+
Entrypoint main = bundle.js
519
+
[./foo.js] x bytes {main} [built]
520
+
[./index.html] x bytes {main} [built]
521
+
[./svg.svg] x bytes {main} [built]
522
+
Child
523
+
Hash: xxxx
524
+
Time: Xms
525
+
Built at: x
526
+
Asset Size Chunks Chunk Names
527
+
bundle.js x KiB main [emitted] main
528
+
Entrypoint main = bundle.js
529
+
[./bar.js] x bytes {main} [built]"
530
+
`;
531
+
532
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the object value: stderr 1`] = `""`;
533
+
534
+
exports[`logging should logging on successfully multi compiler build using the "stats" option for middleware with the object value: stdout 1`] = `
535
+
"Child
536
+
Asset Size Chunks Chunk Names
537
+
bundle.js x KiB main [emitted] main
538
+
index.html x bytes [emitted]
539
+
svg.svg x KiB [emitted]
540
+
Child
541
+
Asset Size Chunks Chunk Names
542
+
bundle.js x KiB main [emitted] main"
543
+
`;
544
+
336
545
exports[`logging should logging on unsuccessful build in multi-compiler: stderr 1`] = `""`;
337
546
338
547
exports[`logging should logging on unsuccessful build in multi-compiler: stdout 1`] = `
0 commit comments