From b36dea1bde0f94a17499de7dee7be9e30b0211c0 Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Sun, 27 Oct 2024 05:48:36 +0000 Subject: [PATCH] build: only remove .rules from Cloudflare Pages --- src/build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build.js b/src/build.js index 10ef371..5fd48c4 100644 --- a/src/build.js +++ b/src/build.js @@ -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)) } }))