Vendor workbox

This commit is contained in:
Ken-Håvard Lieng 2018-11-08 09:39:32 +01:00
parent 9a5d7f8360
commit 9b6844449d
4 changed files with 343 additions and 32 deletions

View file

@ -66,13 +66,13 @@ function fonts() {
function compress() {
return gulp
.src(['dist/!(*.toml|*.json)'])
.src(['dist/**/!(*.dev.js|*.map|*.toml|*.json|*.woff|*.woff2)'])
.pipe(brotli({ quality: 11 }))
.pipe(gulp.dest('dist'));
}
function cleanup() {
return del(['dist/*(*.js|*.css)']);
return del(['dist/**/*(*.js|*.css|*.map)']);
}
function bindata(cb) {

View file

@ -84,6 +84,7 @@ module.exports = {
}),
new InjectManifest({
swSrc: './src/js/sw.js',
importWorkboxFrom: 'local',
globDirectory: './src',
globPatterns: ['font/*.woff2'],
exclude: [