Skip to content

Commit

Permalink
Update vite port based on createServer returned configuration (szymmi…
Browse files Browse the repository at this point in the history
  • Loading branch information
szymmis authored Mar 7, 2023
1 parent 86eabba commit 7815349
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ async function startDevServer() {
server: { port: Config.vitePort },
}).then((server) => server.listen());

const vitePort = server.config.server.port;
if (vitePort && vitePort !== Config.vitePort) Config.vitePort = vitePort;

info(`Vite is listening ${pc.gray(getViteHost())}`);

return server;
Expand Down

0 comments on commit 7815349

Please sign in to comment.