Re-working dev-server and https detection #917
Merged
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.
Hi!
Fixes #903
If you pass
--https
at the command line, that overrides yourdevServer.https
config. In webpack-dev-server v3, that wasn't a problem. But in v4, the certificate config was moved underdevServer.https
, which can now be an object. This meant that if you passed--https
at the command line (which Encore previously required) but also setdevServer.https = { ... }
, that would be "re-set" back todevServer.https = true
and your config would be lost.The fix is to not require the
--https
flag and look at it or the user's config to determine if the dev-server is running in https.Cheers!