Skip to content

Commit c7bae72

Browse files
committed
Fix Vite origin check under default config
1 parent 276f398 commit c7bae72

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/vite-plugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ async function tidewaveServer(
3333

3434
if (typeof host === 'string') {
3535
config.host = host;
36+
} else if (host === undefined) {
37+
// The host can be undefined, in which case the default is localhost,
38+
// see https://vite.dev/config/server-options#server-host.
39+
config.host = 'localhost';
3640
}
3741

3842
if (!(config.host || config.port)) {

0 commit comments

Comments
 (0)