fix playground navigation by disabling live-reload for iframed
This commit is contained in:
parent
92921734e9
commit
6dc68d9ae9
1 changed files with 7 additions and 0 deletions
|
@ -34,6 +34,13 @@ export function createEsbuildLiveReloadTools(): {
|
|||
js: `;(${function liveReloadClientSetup() {
|
||||
// from packages/playground/devEnv/createEsbuildLiveReloadTools.ts
|
||||
function connect() {
|
||||
if (window.parent !== window) {
|
||||
console.log(
|
||||
'%cLive reload disabled for iframed content',
|
||||
'color: gray',
|
||||
)
|
||||
return
|
||||
}
|
||||
try {
|
||||
const es = new EventSource('/esbuild')
|
||||
es.onmessage = (evt) => {
|
||||
|
|
Loading…
Reference in a new issue