nx-firebase icon indicating copy to clipboard operation
nx-firebase copied to clipboard

How to link NextJS Project?

Open thachp opened this issue 1 year ago • 5 comments

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

thachp avatar Nov 17 '23 03:11 thachp

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 avatar Dec 15 '23 22:12 simondotm

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)

simondotm avatar Dec 23 '23 11:12 simondotm

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

thachp avatar Dec 24 '23 03:12 thachp

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.

Crocsx avatar Jan 02 '24 13:01 Crocsx

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!

simondotm avatar Feb 04 '24 23:02 simondotm