vite-plugin-symfony
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -57,2 +57,5 @@ "use strict"; | ||
function resolveDevServerUrl(address, config, pluginOptions) { | ||
if (config.server?.origin) { | ||
return config.server.origin; | ||
} | ||
const configHmrProtocol = typeof config.server.hmr === "object" ? config.server.hmr.protocol : null; | ||
@@ -140,6 +143,2 @@ const clientProtocol = configHmrProtocol ? (configHmrProtocol === "wss" ? "https" : "http") : null; | ||
}; | ||
if (!userConfig.server?.origin) { | ||
const { host = "localhost", port = 5173, https = false } = userConfig.server || {}; | ||
extraConfig.server.origin = `http${https ? "s" : ""}://${host}:${port}`; | ||
} | ||
return extraConfig; | ||
@@ -146,0 +145,0 @@ }, |
{ | ||
"name": "vite-plugin-symfony", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -72,2 +72,6 @@ import { Plugin, UserConfig, ResolvedConfig, ViteDevServer } from "vite"; | ||
): DevServerUrl { | ||
if (config.server?.origin) { | ||
return config.server.origin as DevServerUrl; | ||
} | ||
const configHmrProtocol = typeof config.server.hmr === "object" ? config.server.hmr.protocol : null; | ||
@@ -163,7 +167,2 @@ const clientProtocol = configHmrProtocol ? (configHmrProtocol === "wss" ? "https" : "http") : null; | ||
if (!userConfig.server?.origin) { | ||
const { host = "localhost", port = 5173, https = false } = userConfig.server || {}; | ||
extraConfig.server.origin = `http${https ? "s" : ""}://${host}:${port}`; | ||
} | ||
return extraConfig; | ||
@@ -170,0 +169,0 @@ }, |
Sorry, the diff of this file is not supported yet
120123
820