react-workbox
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -17,5 +17,3 @@ "use strict"; | ||
if (serviceWorker) { | ||
window.addEventListener('load', function () { | ||
registerValidSW(serviceWorker, config); | ||
}); | ||
registerValidSW(serviceWorker, config); | ||
} | ||
@@ -22,0 +20,0 @@ } |
@@ -6,5 +6,3 @@ import emptyFunction from 'empty/function'; | ||
if (serviceWorker) { | ||
window.addEventListener('load', () => { | ||
registerValidSW(serviceWorker, config); | ||
}); | ||
registerValidSW(serviceWorker, config); | ||
} | ||
@@ -11,0 +9,0 @@ } |
{ | ||
"name": "react-workbox", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Manage installation and activation of service worker", | ||
@@ -30,5 +30,6 @@ "license": "MIT", | ||
"prebuild": "rimraf build/", | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build": "npm run build:cjs && npm run build:esm && npm run build:flow", | ||
"build:esm": "BABEL_ENV=esm babel src --out-dir build/esm/ --ignore \"src/**/*.test.js\"", | ||
"build:cjs": "BABEL_ENV=cjs babel src --out-dir build/cjs/ --ignore \"src/**/*.test.js\"", | ||
"build:flow": "echo \"// @flow\\nexport * from '../flow';\" > build/esm/index.js.flow && echo \"// @flow\\nexport * from '../flow';\" > build/cjs/index.js.flow && flow-copy-source --ignore \"**/*.test.js\" src/ build/flow/", | ||
"format": "prettier --config ./.prettierrc --write \"src/**/*.js\" && module-grouping 'src/**/*.js' --write" | ||
@@ -50,2 +51,3 @@ }, | ||
"flow-bin": "0.89.0", | ||
"flow-copy-source": "^2.0.2", | ||
"jest": "23.6.0", | ||
@@ -52,0 +54,0 @@ "module-grouping-cli": "^0.1.0", |
24187
26
15
420