File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ function toCode(param) {
69
69
let result = ''
70
70
switch ( typeof param ) {
71
71
case 'string' :
72
- result += `'${ param . replace ( / \\ / g, '\\\\' ) . replace ( '"' , '\\"' ) . replace ( "'" , "\\'" ) } '`
72
+ result += `'${ param . replace ( / \\ / g, '\\\\' ) . replace ( "'" , "\\'" ) } '`
73
73
break
74
74
case 'number' :
75
75
case 'boolean' :
@@ -98,12 +98,14 @@ options.runtimeCaching.forEach(r => {
98
98
// process plugins field
99
99
if ( r . strategyOptions . plugins ) {
100
100
let pluginsChunk = 'plugins:['
101
- pluginsChunk += r . strategyOptions . plugins . map ( p => 'new workbox.' + pluginModules [ p . use ] + '(' + p . config . map ( toCode ) . join ( ',' ) + ')' ) . join ( ',' )
101
+ pluginsChunk += r . strategyOptions . plugins
102
+ . map ( p => `new workbox.${ pluginModules [ p . use ] } (${ p . config . map ( toCode ) . join ( ',' ) } )` )
103
+ . join ( ',' )
102
104
pluginsChunk += ']'
103
105
strategyOptionsCodeChunks . push ( pluginsChunk )
104
106
}
105
107
106
- // process the rest fields
108
+ // process the remaining fields
107
109
const options = Object . assign ( { } , r . strategyOptions )
108
110
delete options . plugins
109
111
const remainingOptionsCode = toCode ( options ) . slice ( 1 , - 1 )
You can’t perform that action at this time.
0 commit comments