You dont set it up for production. You compile your assets with npm run build
As the command npm run dev implies, it is for dev (development) only
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Could someone help me out? I can figure out how to configure vite.config.js server option for production.
I am using this
server: {
strictPort: 8001,
https: true,
hmr: {
// host: "localhost",
host: "bo.domain.com",
port: 8001,
protocol: "ws",
},
},
but when I open the application, I am encountering an error saying connection timed out and when I inpect the URL I find out that it is loading through port 5173. I am using the same setup on the domain name and it is working flawlessly. Anyone who could tell me the reason why this server setup is not working on the subdomain?
I dont want the assets to be loaded through that port. What Am I supposed to do?
@SimonAngatia then it sounds like you have a file named hot in the public directory. Delete it
Please or to participate in this conversation.