Skip to content

Commit

Permalink
feat: add overlay page
Browse files Browse the repository at this point in the history
  • Loading branch information
ErKeLost committed Dec 25, 2023
1 parent cbd476b commit bc0c017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions examples/react-overlay/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import reactLogo from './assets/react.svg';
import FarmLogo from './assets/logo.png';
export function Main() {
const [count, setCount] = useState(0);
const 123e
return (
<>
<div>
123456456123123123123
<a href="https://farm-fe.github.io/" target="_blank">
<img src={FarmLogo} className="logo" alt="Farm logo" />
</a>
Expand Down
3 changes: 2 additions & 1 deletion packages/runtime-plugin-hmr/src/hmr-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const host =

const path = FARM_HMR_PATH || '/__hmr';
const protocol = location.protocol === 'https:' ? 'wss' : 'ws';

export class HmrClient {
socket: WebSocket;
registeredHotModulesMap = new Map<string, HotModuleState>();
Expand Down Expand Up @@ -287,7 +288,7 @@ async function waitForSuccessfulPing(
headers: {
// Custom headers won't be included in a request with no-cors so (ab)use one of the
// safelisted headers to identify the ping request
Accept: 'text/x-vite-ping'
Accept: 'text/x-farm-ping'
}
});
return true;
Expand Down

0 comments on commit bc0c017

Please sign in to comment.