build: only remove .rules from Cloudflare Pages
This commit is contained in:
		
							parent
							
								
									499330a12d
								
							
						
					
					
						commit
						b36dea1bde
					
				|  | @ -81,9 +81,9 @@ const f = async () => { | |||
| 
 | ||||
|   const files = await readdir(publicPath) | ||||
|   await Promise.all(files.map(async (file) => { | ||||
|     // cf pages limits file size to 26.2MB
 | ||||
|     // cloudflare pages limits file size to 25MB
 | ||||
|     // compressed (br/gz) files are excluded
 | ||||
|     if (file.startsWith('phishing-filter') && file.endsWith('.rules')) { | ||||
|     if (process.env.CF_PAGES && file.startsWith('phishing-filter') && file.endsWith('.rules')) { | ||||
|       await rm(join(publicPath, file)) | ||||
|     } | ||||
|   })) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue