build: only remove .rules from Cloudflare Pages

This commit is contained in:
MDLeom 2024-10-27 05:46:42 +00:00
parent 293507fead
commit 4cdf3fa532
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 4 additions and 2 deletions

View File

@ -57,8 +57,10 @@ const f = async () => {
}
}
// snort2.rules is over 25MB limit of CF Pages
await rm(join(publicPath, 'phishing-filter-snort2.rules'), { force: true })
// snort2.rules is over 25MB limit of Cloudflare Pages
if (process.env.CF_PAGES) {
await rm(join(publicPath, 'phishing-filter-snort2.rules'), { force: true })
}
}
f()