Closed userquin closed 2 years ago
We didn't find any information for the current pull request with the commit 218a86815e38b02402afa7035953b6ff62a81f03. You might need to set the 'NX_BRANCH' environment variable in your CI pipeline.
Check the Nx Cloud Github Integration documentation for more information.
Sent with π from NxCloud.
We need to talk about dynamic pages, should be excluded from the sw precache manifest: a lot of work to be done on server side and also including a custom sw (read https://github.com/antfu/vitesse/discussions/169 and a simple implementation here https://github.com/antfu/vitesse/issues/252#issuecomment-1046085093).
@ElMassimo we can wait, we're releasing a few things on pwa repo, I'll update this PR when pwa 0.12.2
released (2/3 hours)
Great, thanks Joaquin!
Latest commit: |
218a868
|
Status: | β Deploy successful! |
Preview URL: | https://9b00d3fc.iles.pages.dev |
Branch Preview URL: | https://userquin-feat-pwa-use-pretty.iles.pages.dev |
@ElMassimo updated, I have another PR to add ESM support and fix some dev bug and: I think we should remove the support here adding the pwa plugin via vite.plugins
entry
Looks great! Throwing an error if the user provides the plugin in vite.plugins
sounds good π
we have to clean up some internal types of the plugin that are not needed anymore
doing some cleanup
Description π
This PR uses
workbox ManifestTransform
when pwa is configured via@islands/pwa
plugin/module: this way we can control the sw precache manifest, adding or removing entries.Also includes the configuration based on
prettyUrls
onworkbox.navigateFallback
entry: will use theVite base
or/
when not configured.If the pwa plugin is configured via
Vite
instead using@islands/pwa
plugin/module, usingprettyUrls: false
will produce an error on runtime when registering the sw, since it will have the html entries twice in the sw precache manifest: you have a comment about not adding theaddRoutes
entries on line 195 (the comment is aboutprettyUrls: true
, since we'll end with the html file and also the route name, but registering the sw will work).TODO:
iles.config.ts
docs file has a comment about excluding thehtml
entries, we can remove it before merging this PR (the html entries on theglobPatterns
added, the new logic will remove all html entries and recalculate the revision for all routes provided in the SSG callback).console.log
on the pwa module, I added a few logging and so you can check the result.Background π
This was happening because I talk about it with
ElMassimo
;)The Fix π¨
By changing the
Vite PWA Plugin
options to include theworkbox ManifestTransform
to regenerate the manifest entries afterSSG
build.Screenshots π·
Nopes