-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
[REQUIRED] Environment info
firebase-tools: 13.4.1
Platform: Windows
[REQUIRED] Test case
I am deploying Vite React SSR solution for Firebase Express.js but it's not detecting server.js
[REQUIRED] Steps to reproduce
- Clone Vite React SSR example: https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-react
- Run locally and confirm it works with vite
- Follow firebase setup as per https://firebase.google.com/docs/hosting/frameworks/express, so:
- Make sure source is set to
"hosting": { "source": "." }
- Add in package.json
"directories": { "serve": "dist" },
firebase deploy
[REQUIRED] Expected behavior
server.js is running and is replacing html parts
[REQUIRED] Actual behavior
server.js is not running
I tried many configuration options but I don't think express is running at all. If I navigate manually to https://{myapp}.web.app/client the index.html from client react will render react page but without server rendering so I know that hosting is up and fine for client.
When I navigate to https://{myapp}.web.app/server/entry-server.js I also see the file.
I also tried adding to package.json:
"files": ["dist", "server.js"], "main": "server.js",
but it didn't resolve the problem.
This feature is so new that I have issues to find any other tutorial online and after trying many configurations I think it might be broken.
Let me know if I can provide better logs to debug.