You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Phaser JavaScript game framework which requires a static HTML page like:
<html><head><title>hello world!</title><!-- phaser scripts --></head><!-- body automatically injected by phaser --></html>
Unfortunately, live-server fails to detect any file change and refresh when body tags are not present as in the above example. Replacing the comment with <body></body> allows live-server to function properly.
The text was updated successfully, but these errors were encountered:
hi. I encountered a similar problem. I'm not experienced with pull requests but attempted to make one. Please let me know if I missed anything, and I will try to correct it.
Web pages making extensive use of ajax might be fetching html fragments that are not full pages and we should not inject those as that would result in having the script multiple times on a single page. For this reason, live-server uses a simple heuristic to determine when to inject: if it finds a </body> tag. I merged @pmd1991's PR that falls back to injecting to </head> if body is not found, which should help in this particular case.
live-server v1.1.0
I'm using the Phaser JavaScript game framework which requires a static HTML page like:
Unfortunately, live-server fails to detect any file change and refresh when body tags are not present as in the above example. Replacing the comment with
<body></body>
allows live-server to function properly.The text was updated successfully, but these errors were encountered: