Referencing an ENV variable in the Capacitor config file
See original GitHub issueHi there,
I have the following in my capacitor.config.json
file:
{
...
"server": {
"url": "http://localhost:8080"
}
}
I’d like to be able to set that value in an .env
file:
VUE_APP_SERVER_URL=http://localhost:8080
However, I can’t reference process.env.VUE_APP_SERVER_URL
in the JSON file, for obvious reasons. Is there an environment variable name that I can use to set that value, so I can exclude the server
object from my config altogether?
Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Environment Specific Configurations | Capacitor Documentation
The Capacitor configuration file handles high-level options for Capacitor tooling ... To demonstrate differences between each environment, the app name and ...
Read more >Maintain a Global Configuration File - Ionic Framework
Set and print configuration values from project config files and the global CLI config file with Ionic CLI. Read to learn more about...
Read more >CAPACITOR_ANDROID_STUDI...
Attempted to open Android Studio at: You can configure this with the CAPACITOR_ANDROID_STUDIO_PATH environment variable. I referenced it from ...
Read more >Environment Variables in Angular / Ionic | by Adnane Lamghari
Create environment.preprod.ts file in src/environment folder; In your angular.json file add the following lines (edit the config if you want) :.
Read more >Configure Kapacitor - InfluxData Documentation
The path to the configuration file can also be declared using the environment variable KAPACITOR_CONFIG_PATH . Values declared in the configuration file are ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
see https://github.com/ionic-team/capacitor/issues/3133
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.