hunk.code_window:   // Enable Differential loading to run both size checks
     await replaceInFile(
       '.browserslistrc',
       'not IE 9-11',
       'IE 9-11',
     );
     await ng('build', '--aot=false');
     // files were created successfully
     await expectFileToMatch('dist/test-project/polyfills-es5.js', 'core-js/proposals/reflect-metadata');
  
hunk.labels: keep keep keep replace replace keep keep keep keep keep
hunk.after_edit:     'not IE 11',
       'IE 11',
  
hunk.file_path: tests/legacy-cli/e2e/tests/build/polyfills.ts
hunk.type: replace
file: /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  
  import { join, normalize } from '@angular-devkit/core';
  import { Rule } from '@angular-devkit/schematics';
  import { NodeDependencyType, addPackageJsonDependency, removePackageJsonDependency } from '../../utility/dependencies';
  import { getWorkspace } from '../../utility/workspace';
  import { ProjectType } from '../../utility/workspace-models';
  
  
  export default function (): Rule {
    return async host => {
      const workspace = await getWorkspace(host);
  
      for (const [, project] of workspace.projects) {
        if (project.extensions.projectType !== ProjectType.Library) {
          // Only interested in library projects
          continue;
        }
  
        const packageJsonPath = join(normalize(project.root), 'package.json');
        if (!host.exists(packageJsonPath)) {
          continue;
        }
  
        // Remove tslib from any type of dependency
        removePackageJsonDependency(host, 'tslib', packageJsonPath);
  
        // Add tslib as a direct dependency
        addPackageJsonDependency(host, {
          name: 'tslib',
          version: '^2.0.0',
          type: NodeDependencyType.Default,
        }, packageJsonPath);
      }
    };
  }
  