Using following js in my service worker from workboxjs sample for my testing:
importScripts('https://unpkg.com/workbox-sw@0.0.2/build/importScripts/workbox-sw.dev.v0.0.2.js');
I want to try out how to queue the post requests in offline mode using workbox-sw, so once the network is available it process the request from the queue!
Q 1: I think I need to import additional libraries to define my routes for post methods as shown here on github issue #634
How can use import on browser? I tried using importScripts
but it doesn't work.
import * as worker from 'workbox-sw';
import 'workbox-routing';
Q 2: Do I need any additional libraries for background sync, so post methods are queued?