Skip to content

Commit

Permalink
Fix webpack-dev-server options (#5276)
Browse files Browse the repository at this point in the history
* Fix webpack-dev-server options

Bump @redhat-cloud-services/frontend-components-config-utilities from 3.2.2 to 3.2.3
switched from using `onBeforeSetupMiddleware` to `setupMiddlewares`

so we don't need that fix anymore,
but it was also removing devServer.https, which is still used,
deleting as before, with fixed condition.

* npm audit fix
  • Loading branch information
himdel authored Oct 15, 2024
1 parent 0de04e2 commit 4da157b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
9 changes: 1 addition & 8 deletions config/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,8 @@ module.exports = (inputConfigs) => {
);

// webpack-dev-server 5
if (!isBuild && newWebpackConfig.devServer.onBeforeSetupMiddleware) {
const orig = newWebpackConfig.devServer.onBeforeSetupMiddleware;
delete newWebpackConfig.devServer.onBeforeSetupMiddleware;
if (!isBuild && 'https' in newWebpackConfig.devServer) {
delete newWebpackConfig.devServer.https;

newWebpackConfig.devServer.setupMiddlewares = (middlewares, app) => {
orig(app);
return middlewares;
};
}

return {
Expand Down
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4da157b

Please sign in to comment.