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

Question: Is there a way to disable the precaching? #143

Closed
robert-barahona opened this issue May 17, 2024 · 4 comments
Closed

Question: Is there a way to disable the precaching? #143

robert-barahona opened this issue May 17, 2024 · 4 comments

Comments

@robert-barahona
Copy link

robert-barahona commented May 17, 2024

Hi, I would like to know if there is a way to disable the precaching in serwist/next?

@DuCanhGH
Copy link
Member

Use exclude: [() => true]. This is the only way to achieve that in @serwist/next. In the future, we may expose the disablePrecacheManifest option again though.

Also, next time, if you have a question, please open a new discussion rather than an issue.

Hope this helps!

@robert-barahona
Copy link
Author

robert-barahona commented May 20, 2024

@DuCanhGH I did that, but didn't work, I still seeing all the resources being downloaded in the first load of the page 😕... I managed to disable the precaching with this code:

...
self.__SW_MANIFEST

const serwist = new Serwist({
  precacheEntries: [],
...

@DuCanhGH
Copy link
Member

DuCanhGH commented May 20, 2024

@robert-barahona ah, right, you also need additionalPrecacheEntries: []...

Hopefully we can sort the weird mess that is @serwist/next out in v10...

@robert-barahona
Copy link
Author

thank you! that worked

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

No branches or pull requests

2 participants