Skip to content

Commit

Permalink
Fix webpack-dev-server options
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
himdel committed Oct 15, 2024
1 parent 7ec31f3 commit 08b8304
Showing 1 changed file with 1 addition and 8 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

0 comments on commit 08b8304

Please sign in to comment.