workbox-precaching#precacheAndRoute JavaScript Examples

The following examples show how to use workbox-precaching#precacheAndRoute. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: service-worker.js    From ReactCookbook-source with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #2
Source File: service-worker.js    From ResoBin with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST)
Example #3
Source File: sw.js    From terminal7 with GNU General Public License v3.0 5 votes vote down vote up
precacheAndRoute(self.__WB_MANIFEST)
Example #4
Source File: service-worker.js    From esc-configurator with GNU Affero General Public License v3.0 5 votes vote down vote up
/*
 * Precache all of the assets generated by your build process.
 * Their URLs are injected into the manifest variable below.
 * This variable must be present somewhere in your service worker file,
 * even if you decide not to use precaching. See https://cra.link/PWA
 */
precacheAndRoute(self.__WB_MANIFEST);
Example #5
Source File: service-worker.js    From portfolio-react with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST)
Example #6
Source File: service-worker.js    From generator-webapp-rocket with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #7
Source File: service-worker.js    From todo-pwa with MIT License 5 votes vote down vote up
//new NavigationRoute('/index.html');

// The precache routes for workbox-webpack-plugin
precacheAndRoute(self.__WB_MANIFEST);
Example #8
Source File: service-worker.js    From pack11ty with MIT License 5 votes vote down vote up
precacheAndRoute(self.__WB_MANIFEST, {
  // Ignore all URL parameters:
  // https://developers.google.com/web/tools/workbox/modules/workbox-precaching#ignore_url_parameters
  ignoreURLParametersMatching: [/.*/],
});
Example #9
Source File: service-worker.js    From framework7-appstore-react with MIT License 5 votes vote down vote up
// manifest import will be autogenerated by webpack
precacheAndRoute(self.__WB_MANIFEST || []);
Example #10
Source File: service-worker.js    From rahat-vendor with GNU Affero General Public License v3.0 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #11
Source File: service-worker.js    From covid with GNU General Public License v3.0 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST)
Example #12
Source File: service-worker.js    From covid with GNU General Public License v3.0 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #13
Source File: service-worker.js    From ReactCookbook-source with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #14
Source File: service-worker.js    From ReactCookbook-source with MIT License 5 votes vote down vote up
precacheAndRoute(self.__WB_MANIFEST);
Example #15
Source File: service-worker.js    From ReactCookbook-source with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #16
Source File: service-worker.js    From ReactCookbook-source with MIT License 5 votes vote down vote up
precacheAndRoute(self.__WB_MANIFEST);
Example #17
Source File: service-worker.js    From SauceKudasai with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
precacheAndRoute(self.__WB_MANIFEST);
Example #18
Source File: service-worker.js    From WhatSend with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #19
Source File: service-worker.js    From react-enterprise-starter-kit with MIT License 5 votes vote down vote up
// Your other import statements go here.

precacheAndRoute(self.__WB_MANIFEST);
Example #20
Source File: service-worker.js    From zero-neko with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
Example #21
Source File: sw-template.js    From Pf2eTools with MIT License 5 votes vote down vote up
/*
routes take precedence in order listed. if a higher route and a lower route both match a file, the higher route will resolve it
https://stackoverflow.com/questions/52423473/workbox-routing-registerroute-idempotence
*/

// the self value is replaced with key: value pair of file: hash, to allow workbox to carry files over between caches if they match
precacheAndRoute(self.__WB_PRECACHE_MANIFEST);
Example #22
Source File: service-worker.js    From Queen with MIT License 5 votes vote down vote up
// Precache all of the assets generated by your build process.
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);