simondotm / nx-firebase

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

Buildable libs question #109

Closed zpydee closed 1 year ago

zpydee commented 1 year ago

Hi Simon,

Trust you're well...

A quick question - I know your docs explain that imported libs must be buildable, but does this imply that child libs that the built lib imports also needs to be buildable? I've tried without making grand-children buildabe and it seems to create an issue.

Not sure if it's my specific repo or if it is indeed a requirement for nx-firebase that all libs down the dep tree are buildable?

thought i'd ask before I go too much further into my investigation...

zpydee commented 1 year ago

I'm guessing that as soon as you start with buildable libs, everything dependent must also be so...

simondotm commented 1 year ago

@zpydee hi, yeah, you guessed right. The reason they have to be buildable is so we have compiled artefacts we can copy to the firebase deployment folder. Non buildable libs are for when app use bundlers really. To be honest, I've switched over to that approach in my projects and I use rollup to compile & deploy functions now, so no more buildable libs needed. At some point I'll update here on that strategy.

alejandrombc commented 1 year ago

Hi @simondotm how can I make that part of I use rollup to compile & deploy functions now on my own`, can you please guide on some steps to achieve that? 🙏

simondotm commented 1 year ago

V2 of the plugin will resolve this.