Skip to content

Commit 262e368

Browse files
authored
Prevent live reload in production build (#483)
1 parent 1dd250b commit 262e368

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cli/src/components/hooks/useLiveReload.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export default function useLiveReload(onShouldReload: () => void) {
55
const socketRef = useRef<Socket | null>(null);
66

77
useEffect(() => {
8+
if (process.env.NODE_ENV === 'production') {
9+
return;
10+
}
11+
812
// This is required to make navigating between previews work
913
onShouldReload();
1014

0 commit comments

Comments
 (0)