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

fix: pwa assets disabled when using inlined configuration #685

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

userquin
Copy link
Member

closes #682

Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for vite-plugin-pwa-legacy ready!

Name Link
🔨 Latest commit 0fa0b12
🔍 Latest deploy log https://app.netlify.com/sites/vite-plugin-pwa-legacy/deploys/65f2de2b9f4aec00088958d6
😎 Deploy Preview https://deploy-preview-685--vite-plugin-pwa-legacy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@userquin userquin merged commit 7ffeb44 into main Mar 14, 2024
4 checks passed
@userquin userquin deleted the userquin/fix-inline-pwa-assets-configuration branch March 14, 2024 11:54
renovate bot added a commit to SebastianGoeb/chinese-chart that referenced this pull request Mar 18, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite-plugin-pwa](https://togithub.com/vite-pwa/vite-plugin-pwa) |
[`0.19.2` ->
`0.19.4`](https://renovatebot.com/diffs/npm/vite-plugin-pwa/0.19.2/0.19.4)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite-plugin-pwa/0.19.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite-plugin-pwa/0.19.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite-plugin-pwa/0.19.2/0.19.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite-plugin-pwa/0.19.2/0.19.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vite-pwa/vite-plugin-pwa (vite-plugin-pwa)</summary>

###
[`v0.19.4`](https://togithub.com/vite-pwa/vite-plugin-pwa/releases/tag/v0.19.4)

[Compare
Source](https://togithub.com/vite-pwa/vite-plugin-pwa/compare/v0.19.3...v0.19.4)

#####    🐞 Bug Fixes

- **dev**: Inject register not working when disabling web manifest  - 
by [@&#8203;userquin](https://togithub.com/userquin) in
[vite-pwa/vite-plugin-pwa#686
[<samp>(293db)</samp>](https://togithub.com/vite-pwa/vite-plugin-pwa/commit/293db14)

#####     [View changes on
GitHub](https://togithub.com/vite-pwa/vite-plugin-pwa/compare/v0.19.3...v0.19.4)

###
[`v0.19.3`](https://togithub.com/vite-pwa/vite-plugin-pwa/releases/tag/v0.19.3)

[Compare
Source](https://togithub.com/vite-pwa/vite-plugin-pwa/compare/v0.19.2...v0.19.3)

#####    🐞 Bug Fixes

- Pwa assets disabled when using inlined configuration  -  by
[@&#8203;userquin](https://togithub.com/userquin) in
[vite-pwa/vite-plugin-pwa#685
[<samp>(7ffeb)</samp>](https://togithub.com/vite-pwa/vite-plugin-pwa/commit/7ffeb44)

#####     [View changes on
GitHub](https://togithub.com/vite-pwa/vite-plugin-pwa/compare/v0.19.2...v0.19.3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/SebastianGoeb/chinese-chart).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@real34
Copy link

real34 commented Apr 5, 2024

@userquin We found that v0.19.3 introduced some regressions, and believe that it's this change that is the culprit. Icons aren't generated anymore because disabled resolves to true so the generator isn't loaded.

I'll work on a repro and open an issue next week, but wanted to notify sooner in case someone figures it before.

Here's a config that should allow to reproduce:

      pwaAssets: {
        disabled: false,
        config: false,
        preset: {
		  transparent: {
		    sizes: [48, 72, 96, 144, 192, 256, 384, 512], // Comprehensive sizes for various Android devices
		    favicons: [
		      [16, "favicon-16x16.png"],
		      [32, "favicon-32x32.png"],
		      [48, "favicon.ico"],
		    ],
		  },
		  maskable: {
		    sizes: [192, 512], // Recommended sizes for maskable icons
		    padding: 0,
		  },
		  apple: {
		    sizes: [120, 152, 167, 180, 1024], // Covers iPad and iPhone touch icons plus one for the App Store
		  },
		},
        image: "public/favicon.svg",
        htmlPreset: "2023",
      },

@userquin
Copy link
Member Author

userquin commented Apr 5, 2024

can you try removing config: false?

@real34
Copy link

real34 commented Apr 5, 2024

It's still the same.

@userquin
Copy link
Member Author

userquin commented Apr 5, 2024

ok, I'll check it in a few minutes...

@userquin
Copy link
Member Author

userquin commented Apr 5, 2024

@real34 can you file an issue? it is a bug, seems adding the preset sets the disable option to true 🤔

@real34
Copy link

real34 commented Apr 5, 2024

Sure. I'll do it early next week or this weekend, with a reproduction (or test case). I can't do it right now as I have to finalize a feature.

Thanks for your feedback 🙏

@userquin
Copy link
Member Author

userquin commented Apr 5, 2024

no need reproduction, I just copy/paste your configuration in the assets-generator example...

@real34 just the issue...

@userquin
Copy link
Member Author

userquin commented Apr 5, 2024

@real34 issue created, I'm going to release a new version in a few minutes.

@userquin
Copy link
Member Author

userquin commented Apr 5, 2024

@real34 released v0.19.8 fixing the problem, also including a fix about favicon preset, you can remove htmlPreset: "2023", from your configuration, the new version will use 2023 by default, check https://github.com/vite-pwa/vite-plugin-pwa/releases/tag/v0.19.8

@real34
Copy link

real34 commented Apr 16, 2024

@userquin Thanks for this quick fix. It works like a charm!
I'll directly create a new issue next time 👍

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

Successfully merging this pull request may close these issues.

PWA Assets generation on the fly
2 participants