1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-22 22:41:12 +02:00

build: import virtual file handling sw in main sw

This commit is contained in:
Kushagra Gour
2019-01-28 23:13:10 +05:30
parent 3261e74660
commit fe9891354f
3 changed files with 5 additions and 4 deletions

View File

@@ -54,6 +54,7 @@ gulp.task('copyFiles', function() {
'src/detached-window.js', 'src/detached-window.js',
'src/icon-48.png', 'src/icon-48.png',
'src/icon-128.png', 'src/icon-128.png',
'src/virtual-file-service-worker.js',
'manifest.json' 'manifest.json'
]) ])
.pipe(gulp.dest('app')), .pipe(gulp.dest('app')),
@@ -165,7 +166,9 @@ gulp.task('generate-service-worker', function(callback) {
stripPrefix: `${rootDir}/`, stripPrefix: `${rootDir}/`,
// has to be increased to around 2.8mb for sass.worker.js // has to be increased to around 2.8mb for sass.worker.js
maximumFileSizeToCacheInBytes: 2900000 maximumFileSizeToCacheInBytes: 2900000,
importScripts: ['virtual-file-service-worker.js']
}, },
callback callback
); );
@@ -237,5 +240,3 @@ gulp.task('dev-release', function(callback) {
} }
); );
}); });
// gulp.task('default', ['generate-service-worker']);

View File

@@ -2,7 +2,7 @@
*/ */
import { h, Component } from 'preact'; import { h, Component } from 'preact';
import '../service-worker-registration'; // import '../service-worker-registration';
import { MainHeader } from './MainHeader.jsx'; import { MainHeader } from './MainHeader.jsx';
import ContentWrap from './ContentWrap.jsx'; import ContentWrap from './ContentWrap.jsx';
import ContentWrapFiles from './ContentWrapFiles.jsx'; import ContentWrapFiles from './ContentWrapFiles.jsx';