Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

live reloading doesn't work without certain tags #335

Open
towc opened this issue Dec 20, 2019 · 4 comments
Open

live reloading doesn't work without certain tags #335

towc opened this issue Dec 20, 2019 · 4 comments

Comments

@towc
Copy link

towc commented Dec 20, 2019

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 the doctype/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 #242 (comment)

I 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

  • Command line used for launching live-server:
  • OS: Linux
  • Browser (if browser related):
  • Node.js version: 10.5.0
  • live-server version: 1.2.1
@andria-dev
Copy link

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.

@andria-dev
Copy link

Actually, looks like this project hasn't been updated in over a year. I'd consider this project dead now.

@voltuer
Copy link

voltuer commented Mar 4, 2020

Same here, any fixes?

@towc
Copy link
Author

towc commented Mar 4, 2020

@sebolio add a <head></head> at the top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants