- Activated Workbox precache PWA !
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');
if (!workbox) {
workbox = new self.WorkboxSW();
}
if (workbox) {
workbox.core.setCacheNameDetails({prefix: "freeplanet"});
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerRoute(/^http/, workbox.strategies.networkFirst(), 'GET');
}
This commit is contained in:
13
package.json
13
package.json
@@ -1,7 +1,13 @@
|
||||
{
|
||||
"name": "freeplanet",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"private": true,
|
||||
"keywords": [
|
||||
"freeplanet",
|
||||
"free social"
|
||||
],
|
||||
"author": "Paolo Arena",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"lint": "tslint --project tsconfig.json",
|
||||
"lint:fix": "tslint --project tsconfig.json --fix",
|
||||
@@ -10,11 +16,12 @@
|
||||
"pwa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m pwa",
|
||||
"test:unit": "jest",
|
||||
"test:cover": "jest --coverage",
|
||||
"build": "quasar build -m pwa && workbox generateSW workbox-config.js",
|
||||
"build": "quasar build -m pwa",
|
||||
"build:clean": "quasar clean",
|
||||
"serve": "quasar serve ./dist/pwa-mat",
|
||||
"serve:coverage": "quasar serve test/coverage/lcov-report/ --cache 0 --port 8788",
|
||||
"deploy": "deploy.sh"
|
||||
"deploy": "deploy.sh",
|
||||
"generate-sw": "workbox generateSW workbox-config.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/vuelidate": "^0.7.0",
|
||||
|
||||
Reference in New Issue
Block a user