How to configure project integrating Expo and Firebase functions for EAS Build?

I have created a project using the managed workflow.

This is how it is structured:

/
| - app/
| - - - App.jsx
|
| - functions/ (firebase cloud functions directory)
| - - - package.json (npm)
|
| - website/ (docusaurus website for documentation)
| - - - package.json (yarn)
|
| - assets/ (assets for the app)
| - - - images/
| - - - audios/
|
| - index.js (registers the entry point of the application (app/App.jsx))
| - package.json (root, private, yarn)
| - .eslintrc.js
| - app.json
| - app.config.js
| - .gitignore

I have read the following

If I just perform an EAS build, without this extra configuration, will the website and functions folders be included in the final binary?

Note: I am not .gitignoring these directories and I am using eas-cli/0.54.1 darwin-x64 node-v16.13.0

If I just perform an EAS build, without this extra configuration, will the website and functions folders be included in the final binary?

they will be uploaded to eas builder, but it won’t be included in app unless you are importing code from those packages in your mobile app code

Sorry just realized few other things

  • if you mixing yarn and and npm create a separate directory e.g. mobile and move app.json eas.json and other files there. There should be no pacakge.json in the root. This setup would not be called a monorepo having it this way is just separate project in one git repository.
  • other option would be to just use one package manager which I highly recommend (but in this case I also would move everything related to mobile app to the subdirectory)

In that case, the index.js file (that registers the entry point) which, according to the documentation, has to be at the root of the project, should be moved to the app.js right?

yes entrypoint shoutd be in the same directory as app.json and eas.json.

1 Like

@wkozyra Sorry, one other question. I have refactored my monorepo to:

/
| - node_modules/
| - packages/
| - - (... multiple packages)
| - - app/
| - - - - index.js
| - - - - src/
| - - - - metro.config.js
| - - - - package.json
| - - - - .gitignore
|
| -.gitignore
| - package.json (defining workspaces)

What about the .easignore file in monorepos? I have read here that it should be placed in the root folder of the project. What root is that? The root of the monorepo or the root app sub-project?

Also, eas build has to be run from the packages/app/ folder right?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.