-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat!: manifest.json should be generated by cli-plugin-pwa #2981
Conversation
We could also use webpack-pwa-manifest to generate the manifest instead of a simple This would allow users to specify just one image/icon, which would then be down-scaled to all the required different icon sizes. That part is the biggest advantage of creating the manifest programmatically instead of by hand, im my opinion 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. But to not break existing projects relying on manifest.json
, we need to implement a compatibility layer for this feature:
- if the generated
manifest.json
is identical to the existing one, tell the user that they can safely delete the redundant file; - if not identical, prefer the existing one, and output a warning that the settings are not in sync.
Also, a test case would be very much appreciated.
How can I throw a warn when build complete? |
Now that we are planning a v4 alpha release, The compatibility layer is no longer needed. I'll merge this PR directly. Thanks for your contribution! |
manifest.json should be generated by cli-plugin-pwa (#2981)
Thanks again! Cheers! 💚 |
I see the UI hasn't be updated to not use |
This does not seem to work with the default setup using vite any longer. Looking at the code this plugin seems to hook into webpack so is this not compatible with vite? Are there plans to add this support or is this basically in maintenance-only mode and I should look for alternative solutions for vite? |
English description provided by Google Translate.
中文在下方
English description
manifest.json
should be generated bycli-plugin-pwa
and should not be copied directly from thepublic
folder.manifest.json
is a separate file that cannot be modified byvue.config.js
, and these values are very suitable for configuration withvue.config.js
. For example:name
,short_name
,start_url
,icons[].src
.Some attributes of
pwa
are the same or similar to those ofmanifest.json
. For example,pwa.themeColor
andmanifest.theme_color
,pwa.name
andmanifest.name
.中文说明
manifest.json
应该由cli-plugin-pwa
生成,不应该直接从public
文件夹复制。原本
manifest.json
是一个完全独立的文件,通过vue.config.js
无法修改某些值,而这些值又非常合适使用vue.config.js
配置。比如:name
,short_name
,start_url
,icons[].src
。在原有的
pwa
的属性中,有些属性与manifest.json
的属性相似或本应该是同一个。比如pwa.themeColor
和manifest.theme_color
,pwa.name
和manifest.name
。