Skip to content

Commit 9cf3d06

Browse files
committed
fix(@schematics/angular): remove browser field from generated angular.json
The browser field is now optional with a default value of 'src/main.ts' as of commit c560d44. This remove the explicit browser field from the application schematic template since it's no longer needed.
1 parent acd785a commit 9cf3d06

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

packages/schematics/angular/application/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul
295295
builder: Builders.BuildApplication,
296296
defaultConfiguration: 'production',
297297
options: {
298-
browser: `${sourceRoot}/main.ts`,
299298
polyfills: options.zoneless ? undefined : ['zone.js'],
300299
tsConfig: `${projectRoot}tsconfig.app.json`,
301300
inlineStyleLanguage,

packages/schematics/angular/application/index_spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ describe('Application Schematic', () => {
387387
expect(prj.root).toEqual('');
388388
const buildOpt = prj.architect.build.options;
389389
expect(buildOpt.index).toBeUndefined();
390-
expect(buildOpt.browser).toEqual('src/main.ts');
391390
expect(buildOpt.assets).toEqual([{ 'glob': '**/*', 'input': 'public' }]);
392391
expect(buildOpt.polyfills).toBeUndefined();
393392
expect(buildOpt.tsConfig).toEqual('tsconfig.app.json');
@@ -477,7 +476,6 @@ describe('Application Schematic', () => {
477476
const project = config.projects.foo;
478477
expect(project.root).toEqual('foo');
479478
const buildOpt = project.architect.build.options;
480-
expect(buildOpt.browser).toEqual('foo/src/main.ts');
481479
expect(buildOpt.polyfills).toBeUndefined();
482480
expect(buildOpt.tsConfig).toEqual('foo/tsconfig.app.json');
483481
expect(buildOpt.assets).toEqual([{ 'glob': '**/*', 'input': 'foo/public' }]);

0 commit comments

Comments
 (0)