-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Conversation
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`)
✅ Deploy Preview for vite-plugin-pwa ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
I need to add the content type when serving it, I'll fix it. |
const { filePaths } = await generateServiceWorker( | ||
Object.assign( | ||
{}, | ||
options, | ||
{ | ||
workbox: { | ||
...options.workbox, | ||
navigateFallbackDenylist: [new RegExp(`^${webManifestUrl}$`)], |
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.
Do we need to escape regex here?
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.
no, using the constructor will replace with the escaped literal: /manifest.webmanifest
=> ^\/manifest.webmanifest$
.
I check it.
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.
wait, I can double check...
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.
I forgot to use
webManifestUrl
also oninjectDevManifest
: if someone using it will not work (SvelteKit
will not fail since themanifest.webmanifest
is included on the_layout
)