workbox-webpack-plugin
Advanced tools
Comparing version 1.0.0 to 1.0.1
const swBuild = require('workbox-build'); | ||
const path = require('path'); | ||
@@ -21,3 +22,2 @@ /** | ||
* new WorkboxBuildWebpackPlugin({ | ||
* globDirectory: './build/', | ||
* globPatterns: ['**\/*.{html,js,css}'], | ||
@@ -54,6 +54,14 @@ * globIgnores: ['admin.html'], | ||
// output path directory of webpack | ||
if (!config.rootDirectory) { | ||
config.rootDirectory = compilation.options.output.path; | ||
if (!config.globDirectory) { | ||
config.globDirectory = compilation.options.output.path; | ||
} | ||
if (!config.swDest) { | ||
config.swDest = path.join(compilation.options.output.path, 'sw.js'); | ||
} | ||
if (!config.globPatterns) { | ||
config.globPatterns = ['**\/*.{html,js,css}']; | ||
} | ||
return config; | ||
@@ -60,0 +68,0 @@ } |
{ | ||
"name": "workbox-webpack-plugin", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"dependencies": { | ||
"workbox-build": "^1.0.0" | ||
"workbox-build": "^1.0.1" | ||
}, | ||
@@ -29,0 +29,0 @@ "author": "Google's Web DevRel Team", |
15271
80
Updatedworkbox-build@^1.0.1