webpack / webpack-dev-server

Serves a webpack app. Updates the browser on changes. Documentation https://webpack.js.org/configuration/dev-server/.
MIT License
7.76k stars 1.43k forks source link

The server log is being spammed #5140

Closed theninthsky closed 3 months ago

theninthsky commented 3 months ago

Bug report

When starting a server via webpack serve --mode development, the console output logs all incoming requests, even when devMiddleware is set to { stats: 'errors-warnings' } or { stats: false }.

Actual Behavior

> webpack serve --mode development

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:3000/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.208:3000/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::7edc:3578:6c38:8b6a]:3000/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Projects\test-project\public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
webpack compiled successfully
Type-checking in progress...
No errors found.
webpack compiled successfully
No errors found.
CACHE /
CACHE /
CACHE /fonts/montserrat.woff2
CACHE /
CACHE /scripts/mui.main.3c6415.js
CACHE /
CACHE /scripts/main.795874.js
CACHE /
CACHE /scripts/core-js-pure.main.c5ea14.js
CACHE /
CACHE /scripts/react.main.6653df.js
CACHE /
CACHE /scripts/react-dom.main.8faea4.js
CACHE /
CACHE /scripts/remix-run.main.85aff9.js
CACHE /
CACHE /scripts/vendors-node_modules_emotion_css_dist_emotion-css_esm_js-node_modules_emotion_react_dist_emot-6a878a.c5eb49.js
CACHE /
CACHE /scripts/home.2e1c65.js
CACHE /
CACHE /scripts/mui.home.9548c3.js
CACHE /
CACHE /manifest.json
CACHE /
CACHE /icons/icon-x192.png
CACHE /

Expected Behavior

No served asset logs should appear.

How Do We Reproduce?

Use the last version of webpack, run webpack serve --mode development and enter the served page.

Please paste the results of npx webpack-cli info here, and mention other relevant information

 System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 8.73 GB / 15.79 GB
  Binaries:
    Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
    npm: 9.7.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.65)
    Internet Explorer: 11.0.22621.1
  Packages:
    copy-webpack-plugin: ^12.0.2 => 12.0.2
    css-loader: ^6.7.1 => 6.10.0
    eslint-webpack-plugin: ^4.0.0 => 4.1.0
    fork-ts-checker-webpack-plugin: ^9.0.2 => 9.0.2
    html-inline-script-webpack-plugin: ^3.2.0 => 3.2.1
    html-webpack-plugin: ^5.5.0 => 5.6.0
    style-loader: ^3.3.1 => 3.3.4
    swc-loader: ^0.2.6 => 0.2.6
    webpack: ^5.72.0 => 5.91.0
    webpack-cli: ^5.0.1 => 5.1.4
    webpack-dev-server: ^5.0.2 => 5.0.4
    workbox-webpack-plugin: ^7.0.0 => 7.0.0
alexander-akait commented 3 months ago

Fixed, please update your transitive deps, you need to update webpack-dev-middleware

theninthsky commented 3 months ago

@alexander-akait Thanks!