I deploy our Nuxt 3 application using wrangler CLI, like so: NITRO_PRESET=cloudflare-pages npm run build && npx wrangler pages deploy dist/ It tells me ' Deployment complete! Take a peek over at https://1b136818.digistudies-marketing.pages.dev'. However in the cloudflare dashboard it says 'Deployment failed' (see image)
Total size is less than 25MB (13MB~). Amount of files: '2940 Files uploaded'
The issue is partially in this piece of code:
if (actualKey.startsWith('element-')) data = (await import(`@/strapi-content/elements/${actualKey}.ts`)).default; else data = (await import(`@/strapi-content/${actualKey}.ts`)).default;
if (actualKey.startsWith('element-')) data = (await import(`@/strapi-content/elements/${actualKey}.ts`)).default; else data = (await import(`@/strapi-content/${actualKey}.ts`)).default;
This dynamically imports element information (just some meta info for certain pages). Now the deployment fails since I added 800 more of these files. If if I actually remove the first dynamic import then the build tool will not include those files and then it does deploy without problem.
So now the question is why does it fail when I include those 800 extra files? I am not anywhere near the 20k file limit nor am I approaching the total file size limit.
If anybody has any ideas or needs some specific information I'm happy to provide it.