← All tasks
javascriptwebpack/webpack-dev-server #4776Not a task: already works

Add webpack as optional peer dependency

envgap__webpack__webpack-dev-server-4776

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
4e846078b3b9befafbc56b1cd6db7778175355c9
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

webpack/webpack-dev-server #4776 · read the original issue
<!-- Please don't delete this template otherwise your issue will be closed immediately -->

<!-- Before creating an issue please make sure you are using the latest version of webpack. -->



### Feature Proposal

Rspack use webpack-dev-server internally to compatible with devServer functionality but it will cause install warning because lack of webpack. see https://github.com/web-infra-dev/rspack/issues/2318

```sh

└─┬ @rspack/cli 0.1.1

  └─┬ @rspack/dev-server 0.1.1

    ├─┬ webpack-dev-server 4.11.1

    │ ├── ✕ missing peer webpack@"^4.37.0 || ^5.0.0"

    │ └─┬ webpack-dev-middleware 5.3.3

    │   └── ✕ missing peer webpack@"^4.0.0 || ^5.0.0"

    └─┬ @rspack/dev-middleware 0.1.1

      └─┬ webpack-dev-middleware 6.0.0

        └── ✕ missing peer webpack@^5.0.0

Peer dependencies that should be installed:

  webpack@">=5.0.0 <6.0.0"

```

we are wondering whether webpack-dev-server could list webpack as optional peer dependency to help avoid this warning in rspack

<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->

<!-- https://github.com/webpack/webpack/discussions -->

<!-- https://stackoverflow.com/questions/ask?tags=webpack -->

<!-- https://gitter.im/webpack/webpack -->

<!-- Issues which contain questions or support requests will be closed. -->



### Feature Use Case

support use webpack-dev-server in rspack

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

none
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]