Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Fix cross domain livereload in dev mode (#1456)

Ivan Starkov9dd06b37a237
diff --git a/apps/builder/app/shared/remix/root.tsx b/apps/builder/app/shared/remix/root.tsx
index 38a1e662c6..134d8b3faa 100644
--- a/apps/builder/app/shared/remix/root.tsx
+++ b/apps/builder/app/shared/remix/root.tsx
@@ -2,6 +2,7 @@ import { Links, LiveReload, Meta, Outlet, Scripts } from "@remix-run/react";
import { Env } from "~/shared/env";
import { useThemeProps } from "~/shared/theme";
import { CRITICAL_CSS_MARKER } from "./constants";
+import env from "~/env/env.server";
export const Root = () => {
const themeProps = useThemeProps();
@@ -18,7 +19,11 @@ export const Root = () => {
<Outlet />
<Env />
<Scripts />
- {process.env.NODE_ENV === "development" && <LiveReload />}
+ {process.env.NODE_ENV === "development" && (
+ <LiveReload
+ port={env.BUILD_ORIGIN !== undefined ? 3010 : undefined}
+ />
+ )}
</body>
</html>
);