Skip to content

Commit

Permalink
Add hmrHost and hmrPort to the ladle config
Browse files Browse the repository at this point in the history
  • Loading branch information
gapark committed Apr 16, 2024
1 parent 5aff4c3 commit 9113039
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ladle/lib/cli/vite-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const bundler = async (config, configFolder) => {
});
const hmr = {
// needed for hmr to work over network aka WSL2
host: "localhost",
port: hmrPort,
host: config.hmrHost ?? "localhost",
port: config.hmrPort ?? hmrPort,
};
debug(`Port set to: ${port}`);
try {
Expand Down
2 changes: 2 additions & 0 deletions packages/ladle/lib/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ export type Config = {
port: number;
previewHost?: string;
previewPort: number;
hmrHost?: string;
hmrPort?: number;
outDir: string;
base?: string;
mode?: string;
Expand Down

0 comments on commit 9113039

Please sign in to comment.