[GATE-1102]: Fix webpackDevServer config for webpack-dev-server v5 compatibility#202
Merged
Alex Sannikov (xalechez) merged 2 commits intoJun 23, 2026
Merged
Conversation
…atibility webpack-dev-server v5 removed the top-level `https` option (now nested under `server`) and replaced `onBeforeSetupMiddleware`/`onAfterSetupMiddleware` with `setupMiddlewares`. This caused a schema validation error on startup in microsites using backpack-react-scripts@11.2.3. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates react-scripts’ webpack-dev-server configuration to be compatible with webpack-dev-server v5 by migrating removed v4 options/hooks to their v5 equivalents.
Changes:
- Replaced removed top-level
httpsdevServer option with v5serveroption, mappinggetHttpsConfig()output appropriately. - Migrated v4
onBeforeSetupMiddleware/onAfterSetupMiddlewarehooks to the v5setupMiddlewaresAPI.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Alex Sannikov (xalechez)
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
httpsoption with the v5serveroption, mappinggetHttpsConfig()output to the correct format ('http','https', or{ type: 'https', options: { cert, key } })onBeforeSetupMiddleware/onAfterSetupMiddlewarehooks with the v5setupMiddlewaresAPIContext
backpack-react-scripts@11.2.3pulled inwebpack-dev-server@^5.2.2butwebpackDevServer.config.jsstill used v4 APIs, causing this schema validation error on startup in profile, login and subscription-microsite:Those consumers worked around it by either reverting to
11.2.2(profile) or overriding wds back to v4 (login, subscription-microsite). Once this is released as11.2.4they can bump to the fixed version and remove their workarounds.Fixes GATE-1102
TESTING:
Tested locally by packing the patched version with
npm packand installing the tarball directly intoprofile/client. Ran client dev server and it started successfully with no schema validation errors🤖 Generated with Claude Code