jerauf's avatar

Valet isn't using vite

I just set up Valet and haven't made any changes to my site. It had been working with Mamp. But in the @vite directive, I'm seeing http://[::1]:5174 as the path instead of the link to my site.

Any ideas what's happening here?

0 likes
1 reply
JakeCausier's avatar

When you run Vite under development compilation (typically npm run dev), it will run a client in your browser to auto-refresh and rehydrate your page elements when file changes are made. It does this through the localhost:5174 address, which is sometimes formatted at [::1]:5174.

If you build your code using Vite into production compilation (typically npm run build), your asset URLs will use the correct links to your site.

Please or to participate in this conversation.