Open neoighodaro opened 2 years ago
I don‘t understand too,maybe you can see: https://www.npmjs.com/package/dev-ip
I was able to make vite work using custom domains without this package, here's my config:
{
// ...
server: {
host: 'example.test',
origin: 'https://example.test/',
hmr: {
host: 'example.test',
port: 443,
},
},
// ...
}
@neoighodaro thanks feedback, do you want to customize these parameters?
@neoighodaro thanks feedback, do you want to customize these parameters?
Hey thanks for the response.
What parameters? I just wanted to support custom domains in my dev environment but the plugin did not work after following the readme.
Hi, I have the same problem. Can you please expand on the readme?
same. if anyone has any help to offer - nothing works. i just get a failed websocket connection that just reloads the page infinitely
@rossPatton did you see my comment? Mine works fine now without any plugin
My config is work
Create cert by mkcert
mkcert -key-file ./.cert/key.pem -cert-file ./.cert/cert.pem "my-vite-app.test"
{
server: {
https: {
key: "./.cert/key.pem",
cert: "./.cert/cert.pem"
},
host: "my-vite-app.test",
origin: "https://my-vite-app.test"
}
}
@rossPatton did you see my comment? Mine works fine now without any plugin
Sorry, it's been a minute but iirc I tried your config and it didn't work for me. I think the next time I take a pass at this I might try fatgy's approach maybe?
Do you add the /etc/host (MacOS) for 127.0.0.0 example.test?
On Wed, Sep 14, 2022 at 12:37 AM Aaron Hardy @.***> wrote:
None of these solutions seem to work for me. I get:
@thing/thing:dev: WebSocket server error: @thing/thing:dev: Error: getaddrinfo ENOTFOUND example.test @thing/thing:dev: at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:111:26) @thing/thing:dev: error when starting dev server: @thing/thing:dev: Error: getaddrinfo ENOTFOUND example.test @thing/thing:dev: at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:111:26)
for @neoighodaro https://github.com/neoighodaro's solution and a similar one for @fatgy https://github.com/fatgy's.
— Reply to this email directly, view it on GitHub https://github.com/falstack/vite-plugin-host/issues/1#issuecomment-1245730654, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWMFOCUE7NHI4SPBDSZILV6C3WTANCNFSM5IHJG4JA . You are receiving this because you were mentioned.Message ID: @.***>
Hey,
First thanks for this. I assume it solves the issue I am also having which is about using a custom domain for my development in Vite JS. However, theres no explanation on how to use it. I mean i tried adding the host to the plugins list but this did nothing to help me.