There was an error while loading. Please reload this page.
1 parent c3fca96 commit 501ac62Copy full SHA for 501ac62
1 file changed
packages/admin/admin-bundler/src/utils/config.ts
@@ -13,7 +13,9 @@ export async function getViteConfig(
13
const { default: medusa } = await import("@medusajs/admin-vite-plugin")
14
15
const getPort = await import("get-port")
16
- const hmrPort = process.env.HMR_PORT || (await getPort.default())
+ const hmrPort = process.env.HMR_PORT
17
+ ? parseInt(process.env.HMR_PORT)
18
+ : await getPort.default()
19
20
const root = path.resolve(process.cwd(), ".medusa/client")
21
@@ -51,6 +53,10 @@ export async function getViteConfig(
51
53
},
52
54
hmr: {
55
port: hmrPort,
56
+ ...(process.env.HMR_PROTOCOL
57
+ ? { protocol: process.env.HMR_PROTOCOL }
58
+ : {}),
59
+ ...(process.env.HMR_HOST ? { host: process.env.HMR_HOST } : {}),
60
61
62
plugins: [
0 commit comments