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

Problems on fresh app dev and prod #83

Open
JoJo2112 opened this issue Nov 5, 2023 · 3 comments
Open

Problems on fresh app dev and prod #83

JoJo2112 opened this issue Nov 5, 2023 · 3 comments

Comments

@JoJo2112
Copy link

JoJo2112 commented Nov 5, 2023

Offline caching is not working correctly, im getting the following error in production:

Uncaught (in promise) non-precached-url: non-precached-url :: [{"url":"/"}]

My config is basically just the example config.

@userquin
Copy link
Member

userquin commented Nov 5, 2023

You need to prerender workbox navigateFallback, by default /, check nuxt config file in the playground

@JoJo2112
Copy link
Author

JoJo2112 commented Nov 5, 2023

Thank you so much! Prod is now working just fine, is there any way I can also precache the css in dev mode? Currently when I try offline mode im missing the css which I import globally inside from an assets folder.

@userquin
Copy link
Member

userquin commented Nov 5, 2023

Prod is now working just fine, is there any way I can also precache the css in dev mode?

no, devOptions only for webmanifest and custom sw debugging, caching any asset will break DX; you shouldn't have devOptions enabled

In fact, when I have time I'll change the dev plugin to remove/disabling sw precaching (the error you reported here)

Currently when I try offline mode im missing the css which I import globally inside from an assets folder.

If you want to check offline in your local, use build + preview, offline doesn't work in dev.

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