Ensure serviceworker is created as /serviceworker.js (#11577)
#11538 moved the serviceworker to webbox but unfortunately created the serviceworker in public/js rather than public/ This PR fixes this, fixing multiple issues with broken js as a result of that change. Signed-off-by: Andrew Thornton art27@cantab.net
This commit is contained in:
		
							parent
							
								
									38c773d8a5
								
							
						
					
					
						commit
						723b199271
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -76,6 +76,7 @@ coverage.all | |||||||
| /node_modules | /node_modules | ||||||
| /yarn.lock | /yarn.lock | ||||||
| /public/js | /public/js | ||||||
|  | /public/serviceworker.js | ||||||
| /public/css | /public/css | ||||||
| /public/fonts | /public/fonts | ||||||
| /public/fomantic | /public/fomantic | ||||||
|  | |||||||
| @ -47,7 +47,7 @@ module.exports = { | |||||||
|     filename: ({chunk}) => { |     filename: ({chunk}) => { | ||||||
|       // serviceworker can only manage assets below it's script's directory so
 |       // serviceworker can only manage assets below it's script's directory so
 | ||||||
|       // we have to put it in / instead of /js/
 |       // we have to put it in / instead of /js/
 | ||||||
|       return chunk.id === 'serviceworker' ? '[name].js' : 'js/[name].js'; |       return chunk.name === 'serviceworker' ? '[name].js' : 'js/[name].js'; | ||||||
|     }, |     }, | ||||||
|     chunkFilename: 'js/[name].js', |     chunkFilename: 'js/[name].js', | ||||||
|   }, |   }, | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user