Skip to content

Drop support of webpack-dev-server ^4.8, add support for webpack-dev-server ^5.0 #1318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,39 @@ Encore.enableSassLoader((options) => {

* #1324 Drop css-minimizer-webpack-plugin 5 support, only css-minimizer-webpack-plugin 7 is supported (@Kocal)

* #1318 Drop webpack-dev-server 4 support, only webpack-dev-server 5 is supported (@Kocal)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest mentioning that the supported option in the configuration callback have changed, with a link to their changelog. They have BC breaks in their configuration.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


The dev-server options have changed between versions 4 and 5, see [the official migration guide to v5](https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md).
For example:
```js
// With webpack-dev-server 4:
Encore.configureDevServerOptions((options) => {
options.https = {
ca: "./path/to/server.pem",
pfx: "./path/to/server.pfx",
key: "./path/to/server.key",
cert: "./path/to/server.crt",
passphrase: "webpack-dev-server",
requestCert: true,
};
});

// With webpack-dev-server 5 (now):
Encore.configureDevServerOptions((options) => {
options.server = {
type: 'https',
options: {
ca: "./path/to/server.pem",
pfx: "./path/to/server.pfx",
key: "./path/to/server.key",
cert: "./path/to/server.crt",
passphrase: "webpack-dev-server",
requestCert: true,
}
};
});
```

## 4.7.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"tapable": "^2.2.1",
"terser-webpack-plugin": "^5.3.0",
"tmp": "^0.2.1",
"webpack-dev-server": "^4.8.0",
"webpack-dev-server": "^5.0.4",
"yargs-parser": "^21.0.0"
},
"devDependencies": {
Expand Down
Loading