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:
@@ -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']);
|
|
||||||
|
@@ -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';
|
||||||
|
Reference in New Issue
Block a user