Capacitor
By default, Capacitor is configured for a newly generated project. Typically you execute Capacitor commands with ionic capacitor ...
or npx cap ...
. However, due to the way that Nx works, the Capacitor commands go through the Nx CLI.
#
Add Native PlatformFirst, ensure that the frontend project has been built:
Now that a Capacitor project has been added to your Nx workspace you can begin adding support for native platforms. Currently, Capacitor supports Android and iOS, but other platforms can be added with Capacitor plugins.
#
Copy Build OutputCopy the lastest build output to the native platforms:
#
Sync Build Output and DependenciesCopy the latest build output to the native platforms and sync native platform dependencies:
#
Open Native PlatformFinally, you can open the native platform in it's respective IDE:
To learn more about using Capacitor with @nxtend/capacitor
then visit the Getting Started page.