Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These small changes make it so that this project will work out of the box with EAS Build. I left out the EAS Build configuration because that is somewhat account-specific.
With EAS Build, if no App.js or index.js file exists at the root, it creates and index.js file that tries to import
./App
, which it expects to export a root component, which it passes toregisterRootComponent
. This causes an error during the build process that looks like:Since we're calling
registerRootComponent
in our ClojureScript, we want EAS Build to load our./app/index.js
file instead of creating one and loading that. To do this, we create our own index.js file at the root and import./app/index.js
.Since the eas-cli by default does not send files to the build server that are ignored in
.gitignore
, and we want to ignore the shadow compilation output files, we use a build-specific npm hook that EAS Build will call to compile the cljs during the build process. Theeas-build-post-install
script in package.json is used to do this.I've tested these changes myself in another branch on my fork by configuring EAS Build and running a build that creates an apk, downloading that apk, and running it on an emulator.