Skip to content

Commit 65a35c3

Browse files
refactor(build): replace source in environments with environmentDefault entry
Replace source in environments with separate environmentDefault entry and updated docs to reflect this change BREAKING CHANGE: angular-cli.json has changed. A new environmentDefault 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" } Closes angular#3857
1 parent b5f73ac commit 65a35c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/angular-cli/models/webpack-build-common.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ export function getWebpackCommonConfig(
103103
// process environment file replacement
104104
if (appConfig.environments) {
105105
if (!appConfig.environmentSource) {
106-
throw new SilentError(`Environment configuration does not contain "environmentSource" entry.`);
106+
throw new SilentError(`Environment configuration
107+
does not contain "environmentSource" entry.`);
107108
}
108109
if (!(environment in appConfig.environments)) {
109110
throw new SilentError(`Environment "${environment}" does not exist.`);

0 commit comments

Comments
 (0)