title: Module Parse Failed With Optional-Chaining in Angular 10 and ES2020
body: <p>Just updated to Angular 10 from 9.0</p>
  <p>Every use of Optional Chaining (<a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining" rel="noreferrer">https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining</a>) in my code now results in its own instance of the following error</p>
  <pre><code>ERROR in ./src/app/app.component.ts 39:18
  Module parse failed: Unexpected token (39:18)
  File was processed with these loaders:
   * ./node_modules/@ngtools/webpack/src/index.js
  You may need an additional loader to handle the result of these loaders.
  |         this.title = 'my-app';
  |         const x = this.GetObject();
  &gt;         let y = x?.myvar;
  |     }
  </code></pre>
  <p>I confirm that this error ONLY occurs when targeting es2020 as per below from my tsconfig.base.json file, but is fine when targeting es2019</p>
  <pre><code>&quot;target&quot;: &quot;es2020&quot;,  //If set to es2019 then all OK
  &quot;module&quot;: &quot;es2020&quot;,
  &quot;lib&quot;: [
     &quot;es2018&quot;,  //Error also occurs if this set to es2020
      &quot;dom&quot;
    ],
  </code></pre>
  <p>I confirm this error occurs in fresh Angular 10 application when newly generated as below, and then change target to es2020 (so it is not my code!)  Typescript version is 3.9.7</p>
  <pre><code>npm install -g @angular/cli
  ng new my-app
  </code></pre>
  <p>I also note that in the release notes of es2020 that 'Optional Chaining' is now a new feature. This makes me suspicious that Typescript compilation of 'Optional Chaining' somehow is not  marrying up with the new es2020 feature?</p>
  <p>How do I use Optional-Chaining in es2020?</p>