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

Show error message when there's no </head> tag #234

Open
shreevatsa opened this issue Sep 21, 2020 · 1 comment
Open

Show error message when there's no </head> tag #234

shreevatsa opened this issue Sep 21, 2020 · 1 comment

Comments

@shreevatsa
Copy link

I ran into the following issue: I was lazy, had an index.html like

<!DOCTYPE html>

<p>Hello</p>

and so on (with a few more <script> etc), and live-reload mysteriously wasn't working.

It appears that HTML file needs to have a <head> tag, because the code apparently looks for </head>.

It would be nice if there's an error message printed in such a case: "couldn't find </head> in index.html" or whatever.

@liamdiprose
Copy link

Thanks for opening this issue, Lazy first-time user here too 👋 and suffered from the same problem.

Raising a fatal error when there's no <head> is one approach, but that error is almost certainly going to result in the user adding a <head>. Because this tool is aimed at developers that don't want to waste time, I believe it should inject any missing html boilerplate automatically.

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

2 participants