I'm deploying a nextJS app using firebase experimental frameworks.
I find the build process to be very confusing. Somehow when I execute firebase deploy
a container gets built in the google cloud platform. This container has something to do with the code in .firebase//functions directory.
I'm using a custom image loader in my next.config.js which references a file cloudinaryLoader.js
Is there anyway in firebase.json (or) webpack (or) package.json to specify that I need to copy this file into the functions directory? I think that this folder becomes the root of the container that gets built in google cloud platform so that hopefully the file would then be available at /workspace/cloudinaryLoader.js
I need to fix this-- but I would also be interested if anyone has any experience hosting NextJS applications in production? We've found that the built in image optimizer makes the GCP hosted SSR functions extremely unresponsive--latency sometimes >40s for 10kb images and very slow container startups.