ionic-environment-variables | Easy to use environment variables for Ionic3 | iOS library
kandi X-RAY | ionic-environment-variables Summary
kandi X-RAY | ionic-environment-variables Summary
With this configuration, you can import environment variables anywhere, even in your app.module.ts. Also supports any number of custom environments (prod, staging, dev, etc.) This project uses the @ionic/app-script package. I recommend updating/installing this package before starting.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ionic-environment-variables
ionic-environment-variables Key Features
ionic-environment-variables Examples and Code Snippets
Community Discussions
Trending Discussions on ionic-environment-variables
QUESTION
I am trying to find a good solution for dynamically injecting environment variables into an Ionic2 app based on a flag at runtime. For my use case, I need to support more than the default dev/prod options. (e.g. dev/test/qa/prod).
I'm largely basing my approach on the following with a few tweaks: https://github.com/gshigeto/ionic-environment-variables
The environment flag I'm setting is APP_ENV, just before the ionic command, like so:
APP_ENV=dev ionic serve
At build time, I am using a custom webpack.config file to replace an env.ts file with the target environment's .ts file. That looks like this:
./config/Webpack.config
...ANSWER
Answered 2017-Nov-03 at 08:24If you look at the @ionic/app-scripts/config/webpack.config.js it appears the format may have changed for app-scripts v3.
This v3 format expects the following at the end:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ionic-environment-variables
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page