File tree Expand file tree Collapse file tree
src/dotnet/APIView/ClientSPA Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- const version = 'v1.0.0' ;
2- const staticCacheName = `static-${ version } ` ;
1+ const version = process . env . BUILD_BUILDID || 'dev' ;
32const globPatterns = [
43 'favicon.ico' ,
54 'index.html' ,
@@ -16,23 +15,7 @@ module.exports = {
1615 skipWaiting : true ,
1716 clientsClaim : true ,
1817 cleanupOutdatedCaches : true ,
19- } ;
20-
21- self . addEventListener ( 'install' , event => {
22- self . skipWaiting ( ) ;
23- event . waitUntil (
24- caches . keys ( ) . then ( cacheNames => {
25- return Promise . all (
26- cacheNames . map ( cacheName => caches . delete ( cacheName ) )
27- ) ;
28- } ) . then ( ( ) => {
29- return caches . open ( staticCacheName ) . then ( cache => {
30- return cache . addAll ( globPatterns ) ;
31- } ) ;
32- } )
33- ) ;
34- } ) ;
35-
36- self . addEventListener ( 'activate' , event => {
37- event . waitUntil ( self . clients . claim ( ) ) ;
38- } ) ;
18+ modifyURLPrefix : {
19+ '' : `?v=${ version } `
20+ }
21+ } ;
You can’t perform that action at this time.
0 commit comments