self.importScripts("https://github.com/vardius/peer-cdn/blob/v1.0.5-beta/dist/index.js");
const {CachePlugin, DelegatePlugin, NetworkPlugin, strategies: { ordered }} = PeerCDN;
const cachePlugin = new CachePlugin({ version: 1 });
const delegatePlugin = new DelegatePlugin({ timeoutAfter: 5000 });
const networkPlugin = new NetworkPlugin();
const cdn = new PeerCDN();
cdn.GET("/css/main.css", ordered,
cachePlugin.getMiddleware,
delegatePlugin.getMiddleware,
networkPlugin.getMiddleware
);
cdn.register();