This repository was archived by the owner on May 1, 2020. It is now read-only.
Alias for Ionic environment variables#1201
Open
gshigeto wants to merge 1 commit intoionic-team:masterfrom
Open
Alias for Ionic environment variables#1201gshigeto wants to merge 1 commit intoionic-team:masterfrom
gshigeto wants to merge 1 commit intoionic-team:masterfrom
Conversation
Author
|
The second half of this implementation in pull request for ionic2-app-base |
861b5ad to
f9dd87d
Compare
|
Oh wow, this looks neat! Is there some documentation on how this would be used somewhere? |
Author
|
I think you might also want to post in #762 with a short summary how it works and how you would use this in the project when merged. |
Closed
|
Utilizing this currently in a project, had to resolve issues for both custom var path = require('path');
var defaultConfig = require('@ionic/app-scripts/config/webpack.config.js');
module.exports = function () {
const alias = {
"@app/env" : path.resolve('./src/environments/environment.ts')
};
defaultConfig.dev.resolve.alias = alias;
defaultConfig.prod.resolve.alias = alias;
return defaultConfig;
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of what this resolves:
Enables environment variables for any
IONIC_ENVChanges proposed in this pull request:
@app/envfor users to import their environment variablesFixes: #762
Second half of this implementation in pull request for ionic2-app-base