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

feat: use webManifestUrl on injectDevManifest #300

Merged
merged 6 commits into from
Jun 7, 2022

Conversation

userquin
Copy link
Member

@userquin userquin commented Jun 6, 2022

I forgot to use webManifestUrl also on injectDevManifest: if someone using it will not work (SvelteKit will not fail since the manifest.webmanifest is included on the _layout)

I forgot to use `webManifestUrl` also on `injectDevManifest`: if someone using it will not work (`SvelteKit`  will not fail since the `manifest.webmanifest` is included on the `_layout`)
@netlify
Copy link

netlify bot commented Jun 6, 2022

Deploy Preview for vite-plugin-pwa ready!

Name Link
🔨 Latest commit 3384da3
🔍 Latest deploy log https://app.netlify.com/sites/vite-plugin-pwa/deploys/629f6c65538d3f0009edafd6
😎 Deploy Preview https://deploy-preview-300--vite-plugin-pwa.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 settings.

@userquin userquin requested a review from antfu June 6, 2022 12:50
@userquin
Copy link
Member Author

userquin commented Jun 7, 2022

I need to add the content type when serving it, I'll fix it.

@userquin userquin marked this pull request as draft June 7, 2022 13:24
@userquin userquin mentioned this pull request Jun 7, 2022
@userquin userquin marked this pull request as ready for review June 7, 2022 15:19
const { filePaths } = await generateServiceWorker(
Object.assign(
{},
options,
{
workbox: {
...options.workbox,
navigateFallbackDenylist: [new RegExp(`^${webManifestUrl}$`)],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to escape regex here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, using the constructor will replace with the escaped literal: /manifest.webmanifest => ^\/manifest.webmanifest$.

I check it.

Copy link
Member Author

@userquin userquin Jun 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, I can double check...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ok:

imagen

@userquin userquin merged commit be844b0 into main Jun 7, 2022
@userquin userquin deleted the userquin/feat-dev-use-manifest-url branch June 7, 2022 20:39
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.

2 participants