-
Notifications
You must be signed in to change notification settings - Fork 95
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: add support for PWA #95
Comments
Thanks for making an issue for this feature request, I'm surprised I didn't have it logged somewhere. |
@SimonGolms taking a look at this one. Where should we output these images by default? I assume we need to make it configurable given static assets for web apps can be in any place in your project tree |
Hi @mlynch, thanks for the question and I'm happy to see that this topic will hopefully be taken up again. In the best case, the default values are automatically used by the detected template. By default the icons are created in different recommended sizes (TBD1), but this can also be configured with Furthermore the purpose of the icons can be configured with By default the favicon should also be updated. Since it is similar to the Android Bar and Notifications icons in my opinion. If this is not desired, it can be skipped via Footnotes
|
@SimonGolms thanks, this is very helpful. React is easy, but what about Angular? The |
@mlynch, true... my development time with angular is a while back and no experciense with vue so far, but it handles as well differently. 🤯 Anyway, I took a look at the standard templates and compared the PWA support according to the docs and can give you the following insights: ReactRecommended default values:
AngularPWA support for angular apps needs to be added first with src
├─ assets
+ │ └─ icons
+ │ ├─ icon-72x72.png
+ │ ├─ icon-96x96.png
+ │ ├─ icon-128x128.png
+ │ ├─ icon-144x144.png
+ │ ├─ icon-152x152.png
+ │ ├─ icon-192x192.png
+ │ ├─ icon-384x384.png
+ │ └─ icon-512x512.png
+ └─ manifest.webmanifest See: https://angular.io/guide/service-worker-getting-started#adding-a-service-worker-to-your-project Recommended default values:
VuePWA support for vue apps needs to be added first with public
+ └─ img
+ └─ icons
+ ├─ android-chrome-192x192.png
+ ├─ android-chrome-512x512.png
+ ├─ android-chrome-maskable-192x192.png
+ ├─ android-chrome-maskable-512x512.png
+ ├─ apple-touch-icon-120x120.png
+ ├─ apple-touch-icon-152x152.png
+ ├─ apple-touch-icon-180x180.png
+ ├─ apple-touch-icon-60x60.png
+ ├─ apple-touch-icon-76x76.png
+ ├─ apple-touch-icon.png
+ ├─ favicon-16x16.png
+ ├─ favicon-32x32.png
+ ├─ msapplication-icon-144x144.png
+ ├─ mstile-150x150.png
+ └─ safari-pinned-tab.svg See: https://cli.vuejs.org/core-plugins/pwa.html#configuration Recommended default values:
As you can see in the Vue example, it would be great if we could also add the filename and a possible scaling to the generated icon via further configuration, something like SVG support would be great, but I don't see it in I haven't looked at the code base of the new |
This is awesome, thank you so much! I'm definitely missing some stuff in the 1.x branch that I'll have to add for the above, but I have basic PWA asset detection and output working if you're curious: https://github.com/ionic-team/capacitor-assets/tree/1.x Next thing on the list is supporting the adaptive icons, should be straightforward. I'd rather keep the CLI args needed to a minimum, I think if you're that prepared in advance to supply args like that you probably don't need this tool in the first place 😅 |
Basic PWA Support added in |
Feature Request
Describe the Feature Request
Generate icons for PWA and copy the generated icons into the appropriate PWA folder. If possible update the manifest, too.
Describe Alternatives
Related Code
Additional Context
The text was updated successfully, but these errors were encountered: