-
Notifications
You must be signed in to change notification settings - Fork 153
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
HRM hot file use IPv6 while vite devserver running on IPv4 #103
Comments
Hi @jenky, by default the Vite dev server listens on IPv4 and IPv6, if your OS supports it. I can't see anything in your issue that indicates that the Vite dev server is only listening on IPv4. |
Hmm, but some how I can't visit Edit: I think the url is missing |
That's strange! The plugin should be adding the brackets for IPv6 addresses: Line 342 in 6ed250d
|
We've just double-checked this on macOS and the hot file has:
Do you have any |
No I don't. This is my current import { defineConfig, splitVendorChunkPlugin } from 'vite'
import vue from '@vitejs/plugin-vue'
import laravel from 'laravel-vite-plugin'
import DefineOptions from 'unplugin-vue-define-options/vite'
import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig({
plugins: [
splitVendorChunkPlugin(),
vue({
template: {
transformAssetUrls: {
// The Vue plugin will re-write asset URLs, when referenced
// in Single File Components, to point to the Laravel web
// server. Setting this to `null` allows the Laravel plugin
// to instead re-write asset URLs to point to the Vite
// server instead.
base: null,
// The Vue plugin will parse absolute URLs and treat them
// as absolute paths to files on disk. Setting this to
// `false` will leave absolute URLs un-touched so they can
// reference assets in the public directly as expected.
includeAbsolute: false,
},
},
}),
laravel({
input: 'resources/js/app.js',
ssr: 'resources/js/ssr.js',
refresh: true,
}),
DefineOptions(),
AutoImport({
imports: [
'vue',
{
'@inertiajs/inertia-vue3': [
'useForm',
'usePage',
],
},
],
}),
],
}) |
After putting a log in the script, this is the value of The |
Interesting! The type definition for Node's https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/net.d.ts#L22 I've tried with Node 16 and 18 and I can't get it to give me a number. This means TypeScript doesn't even like me testing for a number: |
I found this after doing some research https://nodejs.org/api/net.html#serveraddress. Definitely interesting! |
Taking a look over the changelog I can see that this was released (as shown above) in Node Issue: nodejs/node#43014 Seems changing this was essentially seen as a bug fix as it was breaking many 3rd party packages, thus it was pushed in a minor release. Please update to at least node |
I also encountered the issue without the brackets with node 18.1, upgrading to 18.7 has solved it for me |
This has been addressed in |
Description:
HRM hot file use IPv6 while vite devserver running on IPv4
The URL inside
public/hot
file:http://::1:5173
Steps To Reproduce:
Upgrade from 0.4.0 and vite 2.9.9, then starts the dev server with
npm run dev
The text was updated successfully, but these errors were encountered: