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
feat(config): hmr add disable port config #6624
Conversation
0c73174
to
c02efbe
Compare
CI failed caused by this line
` |
bdee446
to
c2b9bd1
Compare
Looks like the changes now are Solution 2 though. I think Solution 1 seems nicer to avoid another option. |
yeah... but solution 1 make type of port a bit weird, don't you think? |
Hi @bluwy , please review again when you convenient, thanks! |
I also think that solution 1, |
c2b9bd1
to
c9dd9cb
Compare
Sure, now is solution 1 already. |
c9dd9cb
to
5f19019
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for making the change.
We'll discuss it in the next meeting to validate the API change. Thanks @jeoy! |
We are good to merge this PR, let's do it in the 2.9 beta (we should start it soon) |
I think we should update the types in the docs too. |
e811f67
to
1f348c1
Compare
1f348c1
to
f663677
Compare
rebase |
This LGTM with one more update to the docs at https://vitejs.dev/config/#server-hmr |
Docs updated. |
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Description
HMR connecting failed when I have to config a hmr port or using default port.
Unexpected socket host:
www.mydomain.com:3000
Expected socket host:
www.mydomain.com
Using default port cannot solve this problem completely when I need both http(80) and https(443) domain to access.
Adding a custom hmr host config is not a perfect solution, cause I have to config different hmr host for every project.
So, I was wondering if we can add disable port config for this situation?
Solution 1:
Change
port: number
->port: number | false
.Solution 2:
add new config:
disablePort: boolean
(default false)below is changes of Solution 1.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).