Closed Ixonal closed 7 years ago
No, unfortunately there's not. This is possible if you migrate to Workbox, which has support for multiple navigation routes, each with their own white/blacklists.
hmmm... Was putting that off for a while due to how new it is and rather unhelpful Webpack documentation.
I can understand wanting to wait a bit following a new release, but this is one case where your use case is only met with the newer library.
We would like to make the Webpack documentation more helpful!
CC: @prateekbh @kaycebasques if you have any specific complaints/comments about it. (Or feel free to open an issue at https://github.com/GoogleChrome/workbox/issues)
I guess I can open a PR to make the current example more verbose.
sorry it took a bit to reply, kinda zoned out after work.
The main things I'd suggest for the documentation would be to explain what the Webpack plugin does (I'm guessing it inserts code into a predefined service worker if passed in, or creates a new one if not), and have more verbose explanations of what the options do in the reference docs (right now, that page looks about the same as the get started page). If writing the service worker is necessary beyond configuring the plugin, that'd be good to note as well.
Is there a way to make the navigate fallback be different based on some runtime condition? Basically, I have two pages that are both SPAs with push state routing at "/" and "/admin". As-is, I have the navigate fallback just going back to the SPA at "/", but I'd like to be able to have the fallback be "/admin" if "/admin/" is anywhere in the url, or "/" otherwise.