File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,8 @@ function resolvePaths(config) {
134
134
function normalizeURLs ( config ) {
135
135
var basePath = config . basePath . replace ( / ^ \/ * / , '/' ) . replace ( / \/ * $ / , '' ) ;
136
136
var assetPath = config . assetPath . replace ( / ( ^ \/ * | \/ * $ ) / g, '' ) ;
137
+ var workerPath = config . workerPath . replace ( / ^ \/ * / , '/' ) ;
138
+
137
139
return Object . assign ( { } , config , {
138
140
locations : config . locations
139
141
. map ( function ( location ) {
@@ -144,6 +146,7 @@ function normalizeURLs(config) {
144
146
} ) ,
145
147
basePath : basePath ,
146
148
assetPath : assetPath ,
149
+ workerPath : workerPath ,
147
150
} ) ;
148
151
}
149
152
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ module.exports = function installServiceWorker() {
15
15
window . location . hostname === 'localhost'
16
16
) {
17
17
window . addEventListener ( 'load' , function ( ) {
18
- resolve ( navigator . serviceWorker . register ( '/' + hopsConfig . workerPath ) ) ;
18
+ resolve ( navigator . serviceWorker . register ( hopsConfig . workerPath ) ) ;
19
19
} ) ;
20
20
}
21
21
} ) ;
You can’t perform that action at this time.
0 commit comments