diff --git a/gulpfile.js b/gulpfile.js index 5cbe38c..222b501 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -54,6 +54,7 @@ gulp.task('copyFiles', function() { 'src/detached-window.js', 'src/icon-48.png', 'src/icon-128.png', + 'src/virtual-file-service-worker.js', 'manifest.json' ]) .pipe(gulp.dest('app')), @@ -165,7 +166,9 @@ gulp.task('generate-service-worker', function(callback) { stripPrefix: `${rootDir}/`, // has to be increased to around 2.8mb for sass.worker.js - maximumFileSizeToCacheInBytes: 2900000 + maximumFileSizeToCacheInBytes: 2900000, + + importScripts: ['virtual-file-service-worker.js'] }, callback ); @@ -237,5 +240,3 @@ gulp.task('dev-release', function(callback) { } ); }); - -// gulp.task('default', ['generate-service-worker']); diff --git a/src/components/app.jsx b/src/components/app.jsx index 624cf0f..858a03b 100644 --- a/src/components/app.jsx +++ b/src/components/app.jsx @@ -2,7 +2,7 @@ */ import { h, Component } from 'preact'; -import '../service-worker-registration'; +// import '../service-worker-registration'; import { MainHeader } from './MainHeader.jsx'; import ContentWrap from './ContentWrap.jsx'; import ContentWrapFiles from './ContentWrapFiles.jsx'; diff --git a/src/service-worker.js b/src/virtual-file-service-worker.js similarity index 100% rename from src/service-worker.js rename to src/virtual-file-service-worker.js