Open adamdbradley opened 3 years ago
Something to have in mind, appflow relies on the existing config file names to check if it’s a capacitor project, so if we allow any name we should provide some way for indicating it’s a capacitor project.
+1 for custom config file
As a work around you can define a capacitor.config.ts or capacitor.config.js file to programmatically build your config based on Environment Variables.
This would also be very useful in the context of Monorepos where the node_modules are in the root folder and the capacitor.config.ts file is located in a sub directory.
Feature Request
Description
Be able to state which config file to use through the command line. This would be useful when having a dev config and production config, then the build scripts can decide which file to use. Similar concept to configuring dev and prod builds with webpack, rollup, angular, etc. If there's no
--config
or-c
flag then fallback to the original path of finding the config file.Similar Concepts
Alternatives
How Capacitor config actually works is pretty unique in how it copies the built config files to the native builds. That process may offer a better way to do this.
Additional Context
During development, I'd like to set the dev server's localhost path within
server.url
, but do not need that config for production.