Skip to content

Commit cb678d1

Browse files
committed
fix: move the environment files in an envronment folder in src next to main.ts
1 parent 8fd4678 commit cb678d1

File tree

5 files changed

+3
-3
lines changed

5 files changed

+3
-3
lines changed

addon/ng2/blueprints/ng2/files/__path__/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { bootstrap } from '@angular/platform-browser-dynamic';
22
import { enableProdMode } from '@angular/core';
3-
import { environment } from '../config/environment';
3+
import { environment } from './environments/environment';
44
import { AppComponent } from './app/';<% if(isMobile) { %>
55
import { APP_SHELL_RUNTIME_PROVIDERS } from '@angular/app-shell';<% } %>
66

addon/ng2/models/webpack-config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class NgCliWebpackConfig {
2626
constructor(public ngCliProject: any, public target: string, public environment: string) {
2727
const sourceDir = CliConfig.fromProject().defaults.sourceDir;
2828

29-
const environmentPath = `./config/environment.${environment}.ts`;
29+
const environmentPath = `./${sourceDir}/environments/environment.${environment}.ts`;
3030

3131
this.webpackBaseConfig = getWebpackCommonConfig(this.ngCliProject.root, sourceDir);
3232
this.webpackDevConfigPartial = getWebpackDevConfigPartial(this.ngCliProject.root, sourceDir);
@@ -41,7 +41,7 @@ export class NgCliWebpackConfig {
4141

4242
this.generateConfig();
4343
this.config.plugins.unshift(new NgCliEnvironmentPlugin({
44-
path: path.resolve(this.ngCliProject.root, `./config`),
44+
path: path.resolve(this.ngCliProject.root, `./${sourceDir}/environments`),
4545
src: 'environment.ts',
4646
dest: `environment.${this.environment}.ts`
4747
}));

0 commit comments

Comments
 (0)