simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

How to link NextJS Project? #174

Open thachp opened 7 months ago

thachp commented 7 months ago

I'm confused. I have a nextjs project generated using @nx/next call example. When i use the nx-firebase, I'm creating another project sample-firebase. How do I link these two projects. Such that when I deploy, i'm deploying example and not the content that is under sample-firebase/public.

This issue is related to https://github.com/simondotm/nx-firebase/issues/172

simondotm commented 6 months ago

I've never used Next.js unfortunately, but it sounds like it would be useful if nx-firebase could work alongside such projects.

Would you be able to give some steps to create a minimum workspace to repro this scenario?

simondotm commented 6 months ago

Re-reading your question, you are asking how to deploy your nextjs project?

Assuming it is a project that builds to dist as a web bundle, the steps are documented here.

You basically just need to add an entry to your firebase.json config for the additional website you want to deploy (and create a new named site on the firebase console side)

thachp commented 6 months ago

Happy holidays! Okay, I will it a try and get back to you.

Crocsx commented 6 months ago

I am also trying to connect things together, having struggled with default config.

for NextJs app there is some setup to do

https://firebase.google.com/docs/hosting/frameworks/nextjs

so enable firebase experiments:enable webframeworks then from there need to edit the config (I am still trying to understand what I should add)> I don't think it's connected to this library, but it would be nice to have some setup for nextJs project, or some guide to get started.

simondotm commented 4 months ago

If anyone gets this working and would be happy to contribute some user guides for the setup process to this repo, that would be awesome!