As we allow projects to customize their settings in webpack-encore, upgrading to the new major version requires a BC break. For simplicity, I suggest that webpack-encore 5.x uses only the new major version of webpack-dev-server instead of trying to support multiple versions (for dependencies rather than peer dependencies, all of yarn, npm and pnpm will install the latest version in the range anyway. Only yarn --flat or equivalent non-default resolution modes would benefit from a support of older versions, and I don't think there is a valid set of dependencies for webpack-encore for the flat resolution anyway)
webpack-dev-server has a new major version with a bunch of breaking changes: https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md
As we allow projects to customize their settings in webpack-encore, upgrading to the new major version requires a BC break. For simplicity, I suggest that webpack-encore 5.x uses only the new major version of webpack-dev-server instead of trying to support multiple versions (for dependencies rather than peer dependencies, all of yarn, npm and pnpm will install the latest version in the range anyway. Only
yarn --flat
or equivalent non-default resolution modes would benefit from a support of older versions, and I don't think there is a valid set of dependencies for webpack-encore for the flat resolution anyway)