Open towc opened 4 years ago
I'm taking a shot at making a pull request that should solve this issue. Currently, there's a pull request out there, #289, but it seems like it injects the <script>
tag inside the last tag available instead of prepending or appending it to the document.
Actually, looks like this project hasn't been updated in over a year. I'd consider this project dead now.
Same here, any fixes?
@sebolio add a <head></head>
at the top
Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting
Issue description
I was trying to use
live-server
on a barebones html file for quick prototyping, and didn't use any of thedoctype/html/head/body
boilerplate elements, as html5 automatically inserts them in the DOM if not present. After I added a<head>
, live-reloading was working fine. I couldn't find this documented anywhere, and I only got it thanks to https://github.com/tapio/live-server/issues/242#issuecomment-375932248I don't think this should be documented, but rather if it doesn't find a tag, it should just put the script at the top of the file, if the extension is html
Software details
live-server
:live-server
version: 1.2.1