title: Even though I am using target esm2015, ivy is compiles as a esm5 module
body: <p>@angular ivy issue</p>
  <h3>Description</h3>
  <p>When I use the ng cli, it compiles the modules as esm2015, my problem is that I have an old system since angular 2 times and I use webpack, but for me it compiles to es5.</p>
  <p>How can I change it to compile to esm2015?</p>
  <h2> Minimal Reproduction</h2>
  <p>my tsconfig.aot.json:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;compilerOptions&quot;: {
          &quot;rootDir&quot;: &quot;.&quot;,
          &quot;baseUrl&quot;: &quot;.&quot;,
          &quot;skipLibCheck&quot;: true,
          &quot;outDir&quot;: &quot;build/aot&quot;,
          &quot;target&quot;: &quot;es2015&quot;,
          &quot;module&quot;: &quot;esnext&quot;,
          &quot;moduleResolution&quot;: &quot;node&quot;,
          &quot;sourceMap&quot;: true,
          &quot;emitDecoratorMetadata&quot;: true,
          &quot;experimentalDecorators&quot;: true,
          &quot;noImplicitAny&quot;: true,
          &quot;suppressImplicitAnyIndexErrors&quot;: true,
          &quot;lib&quot;: [
              &quot;es2018&quot;,
              &quot;dom&quot;
          ],
          &quot;paths&quot;: {
              &quot;corifeus-web-material&quot;: [
                  &quot;build-modules/corifeus-web-material/index.ts&quot;
              ],
              &quot;corifeus-web&quot;: [
                  &quot;build-modules/corifeus-web/index.ts&quot;
              ],
              &quot;corifeus-web-material/*&quot;: [
                  &quot;build-modules/corifeus-web-material/*&quot;
              ],
              &quot;corifeus-web/*&quot;: [
                  &quot;build-modules/corifeus-web/*&quot;
              ]
          }
      },
      &quot;include&quot;: [
          &quot;build-modules/**/*&quot;,
          &quot;src/angular/**/*&quot;,
          &quot;test/angular-webpack/**/*&quot;
      ],
      &quot;exclude&quot;: [
          &quot;src-save&quot;,
          &quot;*.worker.js&quot;,
          &quot;src/angular/bundle.ts&quot;,
          &quot;test/angular-webpack/angular/bundle.ts&quot;,
          &quot;test/angular-karma&quot;,
          &quot;build/browser&quot;,
          &quot;node_modules/corifeus-web/test&quot;,
          &quot;node_modules/corifeus-web-material/test&quot;
      ],
      &quot;angularCompilerOptions-save&quot;: {
          &quot;annotationsAs&quot;: &quot;decorators&quot;,
          &quot;preserveWhitespaces&quot;: false
      },
      &quot;angularCompilerOptions&quot;: {
          &quot;enableIvy&quot;: true
      }
  }
  </code></pre>
  <pre class="lang-sh prettyprint-override"><code>git clone https://github.com/patrikx3/corifeus-app-web-pages
  cd corifeus-app-web-pages
  npm install
  grunt
  </code></pre>
  <p>output:</p>
  <pre><code>Running &quot;cory-build-aot&quot; task
  
  Compiling @angular/core : module as esm5
  
  Compiling @angular/common : module as esm5
  
  Compiling @angular/common/http : module as esm5
  
  Compiling @angular/animations : module as esm5
  
  Compiling @angular/animations/browser : module as esm5
  
  Compiling @angular/animations/browser/testing : module as esm5
  
  Compiling @angular/cdk/platform : module as esm5
  
  Compiling @angular/cdk/coercion : module as esm5
  
  Compiling @angular/cdk/bidi : module as esm5
  
  Compiling @angular/cdk/collections : module as esm5
  
  Compiling @angular/cdk/scrolling : module as esm5
  
  Compiling @angular/cdk/drag-drop : module as esm5
  
  Compiling @angular/common/http/testing : module as esm5
  
  Compiling @angular/cdk/keycodes : module as esm5
  
  Compiling @angular/cdk/observers : module as esm5
  
  Compiling @angular/cdk/a11y : module as esm5
  
  Compiling @angular/platform-browser : module as esm5
  
  Compiling @angular/cdk : module as esm5
  
  Compiling @angular/platform-browser/animations : module as esm5
  
  Compiling @angular/material/core : module as esm5
  
  Compiling @angular/cdk/portal : module as esm5
  
  Compiling @angular/cdk/overlay : module as esm5
  
  Compiling @angular/forms : module as esm5
  
  Compiling @angular/material/form-field : module as esm5
  
  Compiling @angular/material/autocomplete : module as esm5
  
  Compiling @angular/material/badge : module as esm5
  
  Compiling @angular/cdk/layout : module as esm5
  
  Compiling @angular/material/bottom-sheet : module as esm5
  
  Compiling @angular/material/button : module as esm5
  
  Compiling @angular/material/button-toggle : module as esm5
  
  Compiling @angular/material/card : module as esm5
  
  Compiling @angular/material/checkbox : module as esm5
  
  Compiling @angular/material/chips : module as esm5
  
  Compiling @angular/material/dialog : module as esm5
  
  Compiling @angular/cdk/text-field : module as esm5
  
  Compiling @angular/material/input : module as esm5
  
  Compiling @angular/material/datepicker : module as esm5
  
  Compiling @angular/material/divider : module as esm5
  
  Compiling @angular/cdk/accordion : module as esm5
  
  Compiling @angular/material/expansion : module as esm5
  
  Compiling @angular/material/grid-list : module as esm5
  
  Compiling @angular/material/icon : module as esm5
  
  Compiling @angular/material/list : module as esm5
  
  Compiling @angular/material/menu : module as esm5
  
  Compiling @angular/material/select : module as esm5
  
  Compiling @angular/material/tooltip : module as esm5
  
  Compiling @angular/material/paginator : module as esm5
  
  Compiling @angular/material/progress-bar : module as esm5
  
  Compiling @angular/material/progress-spinner : module as esm5
  
  Compiling @angular/material/radio : module as esm5
  
  Compiling @angular/material/sidenav : module as esm5
  
  Compiling @angular/material/slide-toggle : module as esm5
  
  Compiling @angular/material/slider : module as esm5
  
  Compiling @angular/material/snack-bar : module as esm5
  
  Compiling @angular/material/sort : module as esm5
  
  Compiling @angular/cdk/stepper : module as esm5
  
  Compiling @angular/material/stepper : module as esm5
  
  Compiling @angular/cdk/table : module as esm5
  
  Compiling @angular/material/table : module as esm5
  
  Compiling @angular/material/tabs : module as esm5
  
  Compiling @angular/material/toolbar : module as esm5
  
  Compiling @angular/cdk/tree : module as esm5
  
  Compiling @angular/material/tree : module as esm5
  
  Compiling @angular/material : module as esm5
  
  Compiling @angular/core/testing : module as esm5
  
  Compiling @angular/platform-browser-dynamic : module as esm5
  
  Compiling @angular/platform-browser/testing : module as esm5
  
  Compiling @angular/compiler/testing : module as esm5
  
  Compiling @angular/platform-browser-dynamic/testing : module as esm5
  
  Compiling @angular/common/testing : module as esm5
  
  Compiling @angular/router : module as esm5
  
  Compiling @angular/router/testing : module as esm5
  </code></pre>
  <p>is it an error? i should be getting esm2015 module compiling.</p>
  
  <h2> Exception or Error</h2>
  <p>not directly error, but i target for esm2015</p>
  <h2>  Your Environment</h2>
  <p><strong>Angular Version:</strong> 8.1.2</p>
  <p><strong>Anything else relevant?</strong></p>
  <p>build error,
  i am expecting like :</p>
  <pre><code>Compiling @angular/core : es2015 as esm2015
  
  Compiling @angular/common : es2015 as esm2015
  
  Compiling @angular/platform-browser : es2015 as esm2015
  
  Compiling @angular/platform-browser-dynamic : es2015 as esm2015
  
  </code></pre>