-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
<head>
tag required for the manifest to be correctly injected
#782
Comments
PR welcome 🙏 (use the docs repo) |
Would it be more appropriate to consider this as a bug or to raise a warning instead of just documenting it? |
@simensol can you check using the version from here #784 (comment) ? |
@userquin The warning message works as expected: PWA WARNING:
</head> and <body> not found in the html, the service worker and web manifest will not be injected. However, in my case, only the |
The pr just adds the head if missing, I can change the logic to just log the warning, I will try to change the pr tmr and release a patch version (0.21.1) |
I see. I think creating the missing |
I spent several hours debugging why the
<link rel="manifest" href="/manifest.webmanifest">
tag wasn't injected into my app byvite-plugin-pwa
.Since I use
unjs/unhead
to manage all<head>
tags, myindex.html
entry point didn't have a<head>
tag:I realized that for
vite-plugin-pwa
to inject the manifest, an empty<head>
tag is required:This should probably be documented somewhere.
The text was updated successfully, but these errors were encountered: