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

offline-plugin does not serve assets from service worker #496

Open
sobition opened this issue Apr 28, 2021 · 0 comments
Open

offline-plugin does not serve assets from service worker #496

sobition opened this issue Apr 28, 2021 · 0 comments

Comments

@sobition
Copy link

Hi

I am using offline-plugin package to develop my PWA from a React source code. So far I managed to config the plugin to cache the assets in cache storage, but the problem is that when I open the app without internet connection it won't serve the assets from cache-storage. I can not find out what I am missing in the config. here is my offline-plugin config in webpack

‍‍‍‍‍‍new OfflinePlugin({ relativePaths: true, // publicPath: 'static-files/', excludes: [".htaccess"], caches: { main: [":rest:"], optional: [], }, AppCache: { caches: ["main", "additional", "optional"], FALLBACK: { "/": "static-files/fallback.html" }, }, appShell: "/", safeToUseOptionalCaches: true, responseStrategy: "cache-first", autoUpdate: true, ServiceWorker: { navigateFallbackURL: "/", publicPath: "/sw.js", output: "sw.js", events: true, prefetchRequest: { credentials: "include", mode: "cors", }, }, }),

@sobition sobition changed the title offline-plugin does not serve assets from from service worker offline-plugin does not serve assets from service worker Apr 28, 2021
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

1 participant