Replies: 2 comments
|
First of all, be aware that I'm not familiar enough with Firebase Cloud Functions.
Currently Photon does not officially support it.
This parameter is very experimental. Its support should improve over time though.
I not familiar with
I suppose yes, it will be at some point. I cannot give you an ETA though. |
Yes you should revert to manual integration for now. I'll keep this issue opened until Photon officially supports Firebase. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Configuration
src/pages/+config.ts:
functions/package.json:
{ "type": "module", "main": "lib/functions/src/index.js", "engines": { "node": "22" } }functions/src/server/index.server.ts:
Issue Description
Development Error:
When running
npm run dev, I get:Deployment Error:
When deploying to Firebase (
firebase deploy --only functions), Firebase Tools fails to analyze the codebase:Questions
Is vike-photon currently compatible with Firebase Cloud Functions?
The documentation doesn't mention Firebase/Google Cloud as a supported deployment target, only Cloudflare, Vercel, and self-hosted.
Does
standalone: truemode truly bundle ALL dependencies?It seems Firebase Tools is still trying to dynamically load ESM modules during its analysis phase, which suggests some dependencies or dynamic imports remain unbundled.
Is the
pino-prettyerror related to Vite's module runner?The error occurs because Fastify tries to initialize its logger with
pino-prettytransport, which doesn't seem compatible with Vite's ESM loading mechanism.Should Firebase Cloud Functions be supported?
Firebase CF is a major serverless platform. If it's not currently supported, would it make sense to add it to the roadmap?
Workaround Attempts
standalone: truemodeexport default await buildApp()vike-photonand@photonjs/fastifyto rootpackage.jsonAll attempts result in the same Firebase Tools analysis error
Expected Behavior
Photon should generate a standalone bundle compatible with Firebase Cloud Functions' deployment analysis and runtime environment.
Additional Context
I'm migrating from a manual Vike integration (using
renderPage()directly) tovike-photonto benefit from its serverless optimizations. The manual approach worked fine, but I was trying to adopt the recommended modern architecture.Should I revert to manual integration, or is there a configuration I'm missing for Firebase compatibility?
Thank you very much in advance.
All reactions