ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

bug: multi-app doesn't properly configure capacitor.config.json per project

Open eric-horodyski opened this issue 3 years ago • 1 comments

Description: Establishing a multi-app project structure, such as for a monorepo, creates a root capacitor.config.json file in addition to capacitor.config.json files in each project's directory. However, only the capacitor.config.json file at the root of the repository contains all required Capacitor configuration options. The capacitor.config.json files within each project's directory contains only the appName property.

Steps to Reproduce:

mkdir sample-monorepo && cd ./sample-monorepo
npx lerna init
ionic init --multi-app
cd ./packages
ionic start app1 blank --type=react
ionic start app2 blank --type=react --no-deps

Output Files:

Output:

My ionic info:

[WARN] Multi-app workspace detected, but cannot determine which project to use.
       
       Please set a defaultProject in ./ionic.config.json or specify the project
       using the global --project option. Read the documentation[1] for more
       information.
       
       [1]: https://ion.link/multi-app-docs


Ionic:

   Ionic CLI : 6.13.1 (/Users/eric/npm-global/lib/node_modules/@ionic/cli)

Utility:

   cordova-res (update available: 0.15.3) : 0.15.2
   native-run (update available: 1.3.0)   : 1.2.2

System:

   NodeJS : v14.15.1 (/usr/local/bin/node)
   npm    : 6.14.11
   OS     : macOS Big Sur

Other Information:

This can be resolved by copy & pasting the root config to each project's capacitor.config.json file and modifying the package name and bundle. It is unknown if this root config file serves a purpose however.

eric-horodyski avatar Mar 15 '21 17:03 eric-horodyski

any progress on this? @jcesarmobile

cyptus avatar Mar 18 '24 12:03 cyptus