A plugin for Nx that provides support for Firebase projects in an Nx monorepo workspace.
See CHANGELOG for release notes.
Nx provides a great way to manage monorepo workflows and this plugin helps to integrate Firebase projects with Nx, by:
- Enabling & promoting use of shared Typescript code libraries within Firebase functions
- Retaining a familiar usage of all Firebase features in a way that feels integrated with Nx workflow
- Requiring minimal friction/setup for configuration of an Nx workspace in order to be productive with development, building & deployment of Firebase projects
- Supporting multiple firebase projects within an Nx workspace
Supports:
- Typescript Firebase functions as Nx applications
- Single or multiple Firebase projects in one Nx workspace
- Use of shared Nx buildable libraries in Firebase functions
- Nx provides automatic dependency checking for builds
- Building & serving functions with watch mode
- Firebase Emulators
- Convenience Nx
getconfig
target to fetch remote firebase functions configuration variables to local.runtimeconfig.json
file - Convenience Nx
deploy
,emulate
, andserve
targets for functions
Additionally:
- Auto generates Firebase functions
package.json
ready for no fuss deployment using the Firebase CLI - Auto generates default
firebase.json
configurations, rules and indexes for each Firebase app - Only very lightly opinionated about your Firebase configurations and workspace layouts; you can just use the Firebase CLI as usual
- Keeps all of your firebase rules and indexes within your app folder, to keep your workspace root free of clutter
Nx Applications
Nx Firebase
- Firebase Functions
- Firebase Hosting
- Firebase Emulators
- Firebase Databases
- Firebase Projects
- Firebase Versions
Nx Libraries
Nx Workspaces
- Migrating an existing Firebase project to Nx
- Optimizing Nx Libraries for Firebase Functions
- Nx Versions
Notes