Skip to content
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

url stored in hot file does not follow vite conventions #23

Closed
hailwood opened this issue Jun 21, 2022 · 4 comments · Fixed by #25
Closed

url stored in hot file does not follow vite conventions #23

hailwood opened this issue Jun 21, 2022 · 4 comments · Fixed by #25
Assignees
Labels

Comments

@hailwood
Copy link
Contributor

  • Laravel Vite Plugin Version: 0.2.2
  • Laravel Version: 9.17.0
  • Node Version: 18.0.0
  • NPM Version: 8.6.0

Description:

Right now we store the server IP in the hot file, either the IPV4 or the IPV6 variation.
This causes issues when using a self signed localhost valid certificate as we're telling the server to always load from 127.0.0.1.

Vite has a resolveHostname method we should probably be using. This will also ensure our loaded url matched the dev server running at output from vite.

Steps To Reproduce:

  1. Change the hostname via either --host localhost or server.host
  2. Run npm run hot
  3. Attempt to load a page using vite
  4. Notice that it's requesting 127.0.0.1 instead
@jessarcher
Copy link
Member

@hailwood That makes sense, I will have a look at this.

@jessarcher
Copy link
Member

Doesn't look like Vite exports resolveHostname() anywhere that we can access it.

A lot of the "dev server running at" output has changed with Vite 3 as well.

Are you able to test #25 to see if it resolves your issue?

@hailwood
Copy link
Contributor Author

@jessarcher I'll continue discussion directly on the PR :)

@driesvints
Copy link
Member

Closing as a PR was opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants