Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@angular/cli): use environmentSource key for environments #4705

Merged
merged 3 commits into from Feb 16, 2017

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Feb 14, 2017

Heavily based on @jsanchezgarcia work in #4476.

Fix #3857

BREAKING CHANGE:

A new environmentSource entry replaces the previous source entry inside environments.

To migrate the code follow the example below:

Before:

"environments": {
  "source": "environments/environment.ts",
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}

After:

"environmentSource": "environments/environment.ts",
"environments": {
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}

@filipesilva
Copy link
Contributor Author

An alias should be added in

Heavily based on @jsanchezgarcia work in angular#4476.

Fix angular#3857

BREAKING CHANGE:

A new environmentSource entry replaces the previous source entry inside environments.

To migrate the code follow the example below:

Before:
```
"environments": {
  "source": "environments/environment.ts",
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```

After:
```
"environmentSource": "environments/environment.ts",
  "environments": {
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```
@@ -19,15 +19,16 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any) {
let hostOverrideFileSystem: any = {};
// process environment file replacement
if (appConfig.environments) {
if (!('source' in appConfig.environments)) {
throw new SilentError(`Environment configuration does not contain "source" entry.`);
if (!appConfig.environmentSource) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify if environment.source is set here and explain to the user the change s/he needs to make.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@filipesilva filipesilva merged commit 16bfdf0 into angular:master Feb 16, 2017
@filipesilva filipesilva deleted the environment-source branch February 16, 2017 12:09
asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this pull request Apr 12, 2017
…ar#4705)

Heavily based on @jsanchezgarcia work in angular#4476.

Fix angular#3857

BREAKING CHANGE:

A new environmentSource entry replaces the previous source entry inside environments.

To migrate the code follow the example below:

Before:
```
"environments": {
  "source": "environments/environment.ts",
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```

After:
```
"environmentSource": "environments/environment.ts",
  "environments": {
  "dev": "environments/environment.ts",
  "prod": "environments/environment.prod.ts"
}
```
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace source in environments with separate environmentDefault entry
4 participants