Skip to content

Commit 51907f4

Browse files
committed
dep upd, test bundle fix
1 parent a95d1c6 commit 51907f4

File tree

4 files changed

+32
-163
lines changed

4 files changed

+32
-163
lines changed

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flexis/workbox-webpack-plugin",
3-
"version": "1.1.0-beta",
3+
"version": "1.2.0",
44
"description": "Webpack plugin to generate and inject precache manifest to ServiceWorker.",
55
"author": "dangreen",
66
"license": "MIT",
@@ -40,8 +40,8 @@
4040
"dependencies": {
4141
"@babel/runtime": "^7.2.0",
4242
"core-js": "3",
43-
"service-worker-loader": "*",
44-
"webpack-sources": "^1.3.0",
43+
"service-worker-loader": "3",
44+
"webpack-sources": "^1.4.3",
4545
"workbox-build": "^4.3.1",
4646
"workbox-webpack-plugin": "^4.3.1"
4747
},
@@ -60,8 +60,7 @@
6060
"memory-fs": "^0.4.1",
6161
"rollup-plugin-eslint": "^6.0.0",
6262
"rollup-plugin-json": "^4.0.0",
63-
"service-worker-loader": "^3.0.0",
64-
"webpack": "^4.28.3"
63+
"webpack": "^4.39.3"
6564
},
6665
"files": [
6766
"lib"

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
onHook
2424
} from './utils';
2525

26-
const SERVICE_WORKER_LOADER_COMPILER_NAME = identifier || 'service-worker';
26+
const ServiceWorkerCompiler = identifier || 'service-worker';
2727

2828
export default class WorkboxWebpackPlugin {
2929

@@ -145,7 +145,7 @@ export default class WorkboxWebpackPlugin {
145145

146146
onHook(compilation, 'childCompiler', (compiler, compilerName) => {
147147

148-
if (compilerName !== SERVICE_WORKER_LOADER_COMPILER_NAME) {
148+
if (compilerName !== ServiceWorkerCompiler) {
149149
return;
150150
}
151151

test/serviceWorker.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* eslint-env serviceworker */
2-
import precaching from 'workbox-precaching';
2+
import {
3+
precacheAndRoute
4+
} from 'workbox-precaching';
35

4-
precaching.precacheAndRoute(self.__precacheManifest);
6+
precacheAndRoute(self.__precacheManifest);
57

68
setInterval(() => {
79
postMessageToAll({

0 commit comments

Comments
 (0)