-
-
Notifications
You must be signed in to change notification settings - Fork 27k
fix: replace https to server to support Webpack 5 #11806
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
base: main
Are you sure you want to change the base?
fix: replace https to server to support Webpack 5 #11806
Conversation
Still there: |
@vHeemstra Yes, but no one takes a look at this and approves the PR :( |
LGTM. Can we merge this? |
Has there been any progress? |
Thanks for fixing this, I hope it gets merged soon! |
Another year+ and still open and not merged or am I missing something? |
Describe the bug
Project CRA 5, with a
.env.development.local
file configured with HTTPS settings, gives deprecation warning.Actual behavior
A deprecation warning is issued on bootstrap, app still works properly.

Screenshot:
Core idea
create-react-app/packages/react-scripts/config/webpackDevServer.config.js
Line 102 in 20edab4
Replace
https: getHttpsConfig(): { cert: Buffer; key: Buffer; } | boolean
with
server: getServerConfig(): "http" | "https" | { type: "https"; options: { cert: Buffer; key: Buffer; }; }
Modify the function to move https config into "server" options and align schemas
After fixing
The deprecation warning is eliminated successfully.

Screenshot: