File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ class NetlifyServerPushPlugin {
2525 let mainJs = '# no js files' ;
2626 let mainCss = '# no css files' ;
2727
28- const hasEsm = Object . keys ( compilation . assets ) . filter ( filename => / \. e s m \. j s $ / . test ( filename ) ) . length !== 0 ;
28+ const hasEsm =
29+ Object . keys ( compilation . assets ) . filter ( filename =>
30+ / \. e s m \. j s $ / . test ( filename )
31+ ) . length !== 0 ;
2932
3033 for ( const filename in compilation . assets ) {
3134 if ( ! / \. m a p $ / . test ( filename ) ) {
@@ -38,7 +41,7 @@ class NetlifyServerPushPlugin {
3841 } else if ( ! hasEsm && / ^ b u n d l e ( .+ ) \. j s $ / . test ( filename ) ) {
3942 mainJs = `Link: </${ filename } >; rel=preload; as=script` ;
4043 }
41- }
44+ }
4245 }
4346
4447 let headers =
@@ -50,7 +53,7 @@ class NetlifyServerPushPlugin {
5053
5154 const redirects = `${ this . redirects . join ( '\n' ) } \n/* /index.html 200` ;
5255
53- if ( ! routes . length ) {
56+ if ( routes . length === 0 ) {
5457 headers += `\n/*\n\t${ mainCss } \n\t${ mainJs } ` ;
5558 }
5659
You can’t perform that action at this time.
0 commit comments