webpack / webpack-dev-server

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

Types of version 5.0.0 still allow `proxy` to be an object #5098

Closed levrik closed 7 months ago

levrik commented 7 months ago

Bug report

Actual Behavior

The TS typings still allow an object to be passed to the proxy option while it crashes at runtime.

Expected Behavior

The TS typings should be updated to reflect the API changes.

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

System:
  OS: macOS 13.6.4
  CPU: (8) arm64 Apple M1 Pro
  Memory: 54.72 MB / 16.00 GB
Binaries:
  Node: 18.19.0 - /opt/homebrew/opt/node@18/bin/node
  Yarn: 1.22.19 - /opt/homebrew/bin/yarn
  npm: 10.2.3 - /opt/homebrew/opt/node@18/bin/npm
Browsers:
  Safari: 17.3.1
Packages:
  babel-loader: 9.1.3 => 9.1.3 
  copy-webpack-plugin: 12.0.2 => 12.0.2 
  fork-ts-checker-webpack-plugin: 9.0.2 => 9.0.2 
  html-webpack-plugin: 5.6.0 => 5.6.0 
  source-map-loader: 5.0.0 => 5.0.0 
  webpack: 5.90.3 => 5.90.3 
  webpack-cli: 5.1.4 => 5.1.4 
  webpack-dev-server: 5.0.2 => 5.0.2