Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Functions Feature]: Support monorepo setup in functions deployment #510

Open
mkue opened this issue Aug 15, 2023 · 2 comments
Open

[Functions Feature]: Support monorepo setup in functions deployment #510

mkue opened this issue Aug 15, 2023 · 2 comments
Assignees

Comments

@mkue
Copy link
Contributor

mkue commented Aug 15, 2023

Firebase functions don't support monorepos properly. This is why we need to use relative imports and install all dependencies specifically in the functions/ project.

By integrating this project, the problem could be solved: https://github.com/0x80/isolate-package

The goal would be to be able to specify

"@socialincome/shared": "^1.0.0"

as a dependency in the functions/package.json file and use regular imports, e.g.
import { FirestoreAdmin } from '@socialincome/shared/src/firebase/admin/FirestoreAdmin'
instead of
import { FirestoreAdmin } from '../../../../shared/src/firebase/admin/FirestoreAdmin'

More info about the problem can be found here: firebase/firebase-tools#653

@DarkMenacer
Copy link
Contributor

DarkMenacer commented Aug 25, 2023

PR Created: #526

@DarkMenacer
Copy link
Contributor

I had created a fork of the original repo to solve this issue.
Now that I can create branches in the original repo, I've deleted the fork and created a branch here.
Here's the branch that contains the code to solve this issue: https://github.com/socialincome-san/public/tree/pranav/functions-isolate-package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants