-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Dynamic manifest file #578
Comments
You can use |
Ok, makes it simpler. Do you know of other way to set the manifest dynamically? |
It depends on the permutations, beware, not all fields can be updated and some user agents can take long time to update. You can try generate all and return the proper one , we use that approach in elk.zone github repo (nuxt 3), check modules/pwa/i18n.ts module, we generate 2 manifests per locale (dark and light theme variants). You can also generate them in the server... |
I'll do that. |
你好,为什么我这么写会报错? |
你好,这个问题解决了吗? 我也有相同的问题= . = |
I have came up with a solution for changing the manifest file, but I don't think it is really appropriate.
I basically have a plugin in the
vite.config
to remove thehref
attribute from the<link rel='manifest' (..)>
.Then I create a manifest file and, and add the
href
to the<link rel='manifest'>
again.If I just change the
href
it won't work, I need to have the build without it and then add it manually so I can set the manifest dynamically.This solution works, but it does not seem right.
Is there any other way to do this?
If not, can we at least have the option to not generate the
manifest.webmanifest
and not have thehref
set in thelink
tag?The text was updated successfully, but these errors were encountered: