Ben
CDCloudflare Developers
•Created by Ben on 10/10/2024 in #workers-help
size limit - how do I check the worker size in a build folder
I use remix to create a pages project. After running
npm run build
, the build folder contains:
/client:
Biggest asset:
1,134.13 kB │ gzip: 331.80 kB
/server/index.js:
851.96 kB
I now want to add a client-side background removal package: https://www.npmjs.com/package/@imgly/background-removal
Running npm run build
again, I now get this:
/client:
Biggest asset:
2,687.03 kB │ gzip: 732.08 kB
/server/index.js:
852.41 kB
And this version will run into the cloudflare 1MiB worker size limit, the one without the background-remover does not.
In both cases, npx wrangler --dry-run
gives me the exact same results:
Total Upload: 1795.57 KiB / gzip: 302.92 KiB
Which metrics should I check in order to understand if I'll hit the workers size limit?1 replies